Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 49084 invoked from network); 28 Jun 2006 10:26:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jun 2006 10:26:06 -0000 Received: (qmail 58768 invoked by uid 500); 28 Jun 2006 10:26:06 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 58674 invoked by uid 500); 28 Jun 2006 10:26:06 -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 58663 invoked by uid 99); 28 Jun 2006 10:26:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jun 2006 03:26:06 -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; Wed, 28 Jun 2006 03:26:05 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 30D827141F3 for ; Wed, 28 Jun 2006 10:24:30 +0000 (GMT) Message-ID: <15424649.1151490270170.JavaMail.jira@brutus> Date: Wed, 28 Jun 2006 10:24:30 +0000 (GMT+00:00) From: "George Harley (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Resolved: (HARMONY-683) [classlib][nio] java.nio.channels.DatagramChannel.write fails to write ByteBuffer whose position is not zero. In-Reply-To: <8320554.1151472570322.JavaMail.jira@brutus> 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 [ http://issues.apache.org/jira/browse/HARMONY-683?page=all ] George Harley resolved HARMONY-683: ----------------------------------- Resolution: Fixed Hi Andrew, Good catch ! Your patch has been committed in revision 417714. Please could you verify that it has been applied as expected. Thanks, George > [classlib][nio] java.nio.channels.DatagramChannel.write fails to write ByteBuffer whose position is not zero. > ------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-683 > URL: http://issues.apache.org/jira/browse/HARMONY-683 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Andrew Zhang > Assignee: George Harley > Attachments: nio.diff > > java.nio.channels.DatagramChannel.write(ByteBuffer),write(ByteBuffer,int,int) fails to write ByteBuffer whose position is not zero. > Following test case reproduces the bug. > I'll upload a patch soon. Thanks! > Test Case: > public void test_write_buffer_positioned() throws Exception { > int CAPACITY_NORMAL = 256; > int postion = 16; > DatagramChannel dc = DatagramChannel.open(); > SocketAddress addr = new InetSocketAddress("127.0.0.1", > 50000); > byte[] sourceArray = new byte[CAPACITY_NORMAL]; > dc.connect(addr); > // write > ByteBuffer sourceBuf = ByteBuffer.wrap(sourceArray); > sourceBuf.position(postion); > assertEquals(CAPACITY_NORMAL - postion, dc.write(sourceBuf)); > } > Test result: > RI 5.0 passes the test while Harmony fails. -- 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