harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6209) [classlib][nio] java.nio.CharBuffer.read(CharBuffer target) throws an IllegalArgumentException while RI doesn't in a special scenario
Date Fri, 15 May 2009 08:32:45 GMT

    [ 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.


Mime
View raw message