You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2009/05/15 10:32:45 UTC
[jira] Commented: (HARMONY-6209) [classlib][nio]
java.nio.CharBuffer.read(CharBuffer target) throws an
IllegalArgumentException while RI doesn't in a special scenario
[ https://issues.apache.org/jira/browse/HARMONY-6209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709759#action_12709759 ]
Kevin Zhou commented on HARMONY-6209:
-------------------------------------
Also, I found another problem of java.nio.CharBuffer.read(CharBuffer cb) method. Conduct the below test case [1] on HARMONY, it fails while RI passes it.
[1] Test Case:
public void test_CharBuffer_read2() throw Exception {
CharBuffer c = CharBuffer.allocate(1);
CharBuffer d = c.append(c);
CharBuffer e = CharBuffer.allocate(0);
CharBuffer f = CharBuffer.wrap(c);
assertEquals(-1, e.read(f));
}
> [classlib][nio] java.nio.CharBuffer.read(CharBuffer target) throws an IllegalArgumentException while RI doesn't in a special scenario
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-6209
> URL: https://issues.apache.org/jira/browse/HARMONY-6209
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M9
> Reporter: Kevin Zhou
> Fix For: 5.0M10
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Given a test case [1], RI passes it while HARMONY throws a java.lang.IllegalArgumentException [2].
> [1] Test Case:
> public void test_CharBuffer_read() throw Exception {
> char[] charArray = new char[] { 'a', 'b' };
> CharBuffer charBuffer = CharBuffer.wrap(charArray);
> charBuffer.put(charArray);
> assertEquals(-1, charBuffer.read(charBuffer));
> }
> [2] Stack Trace:
> java.lang.IllegalArgumentException
> at java.nio.CharBuffer.read(CharBuffer.java:786)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.