Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 30852 invoked from network); 15 Jun 2007 17:53:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jun 2007 17:53:50 -0000 Received: (qmail 99534 invoked by uid 500); 15 Jun 2007 17:53:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 99516 invoked by uid 500); 15 Jun 2007 17:53:51 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 99358 invoked by uid 99); 15 Jun 2007 17:53:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2007 10:53:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Jun 2007 10:53:47 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E91937141E0 for ; Fri, 15 Jun 2007 10:53:26 -0700 (PDT) Message-ID: <29122077.1181930006952.JavaMail.jira@brutus> Date: Fri, 15 Jun 2007 10:53:26 -0700 (PDT) From: "Vladimir Strigun (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-33) [classlib][nio] java.nio.BufferOverflow exception while decoding ByteBuffer with UTF-16 charset MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-33?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Strigun resolved HARMONY-33. ------------------------------------- Resolution: Cannot Reproduce This bug is not reproducible with current charset impl, so closing as Cannot Reproduce > [classlib][nio] java.nio.BufferOverflow exception while decoding ByteBuffer with UTF-16 charset > ----------------------------------------------------------------------------------------------- > > Key: HARMONY-33 > URL: https://issues.apache.org/jira/browse/HARMONY-33 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Vladimir Strigun > Priority: Minor > > If I try to decode ByteBuffer with lengh 1 using UTF-16 decoder unexpected java.nio.BufferOverflow exception occured. Please see testcase below. > import java.nio.*; > import java.nio.charset.*; > import junit.framework.TestCase; > public class TestDecoder extends TestCase { > public static void main(String[] args) { > junit.textui.TestRunner.run(TestDecoder.class); > } > public static void testDecoder(){ > try{ > ByteBuffer bb = ByteBuffer.allocate(1); > bb.put(0,(byte)77); > CharsetDecoder utf16D = Charset.forName("UTF-16").newDecoder(); > CharBuffer cb = utf16D.onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE).decode(bb); > }catch(Exception e){ > fail("Exception occured: "+e); > } > } > } > Output on RI: > . > Time: 0,03 > OK (1 test) > Output with Harmony: > .F > Time: 0,01 > There was 1 failure: > 1) testDecoder(TestDecoder)junit.framework.AssertionFailedError: Exception occured: java.nio.BufferOverflowException > at TestDecoder.testDecoder(TestDecoder.java:20) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:211) > at TestDecoder.main(TestDecoder.java:10) > FAILURES!!! > Tests run: 1, Failures: 1, Errors: 0 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.