Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 26178 invoked from network); 2 Jun 2006 02:16:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Jun 2006 02:16:25 -0000 Received: (qmail 88617 invoked by uid 500); 2 Jun 2006 02:16:24 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 88521 invoked by uid 500); 2 Jun 2006 02:16:24 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 88508 invoked by uid 99); 2 Jun 2006 02:16:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2006 19:16:23 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jun 2006 19:16:23 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C15157141D1 for ; Fri, 2 Jun 2006 02:15:29 +0000 (GMT) Message-ID: <6854180.1149214529789.JavaMail.jira@brutus> Date: Fri, 2 Jun 2006 02:15:29 +0000 (GMT+00:00) From: "Paulex Yang (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Created: (HARMONY-549) [classlib][nio-channels]java.nio.channels.SocketChannel.read/write mis-acts in some condition. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [classlib][nio-channels]java.nio.channels.SocketChannel.read/write mis-acts in some condition. ---------------------------------------------------------------------------------------------- Key: HARMONY-549 URL: http://issues.apache.org/jira/browse/HARMONY-549 Project: Harmony Type: Bug Components: Classlib Reporter: Paulex Yang Priority: Minor 1. java.nio.channels.SocketChannel.read(ByteBuffer[],int,int) & read(ByteBuffer[]) hang when reading a ByteBuffer array if one of its elements is null. The bug is caused by incorrect sequence of ByteBuffer-checking. The elements must be checked before reading, currently Harmony reads and won't throw NPE until it meets a null ByteBuffer. 2. java.nio.channels.SocketChannel.write(ByteBuffer[],int,int) should check if any elements of ByteBuffer array is null before writing into socket. Currently Harmony writes and won't throw NPE until it meets a null ByteBuffer. 3. java.nio.channels.SocketChannel.write(ByteBuffer) causes an IllegalArgumentException while writing a bytebuffer whose position is not zero. 4. java.nio.channels.SocketChannel.write(ByteBuffer) should throw NPE ahead of ClosedChannelException. When SocketChannel is closed and writes a null buf, it should throw NPE. 5. java.nio.channels.SocketChannel.read(ByteBuffer[],int,int) fails to return -1 when the socket meets EOF. I'll attach test cases and patch for them soon. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira