harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-902) [classlib][nio] compatibility: java.nio.channels.FileChannel.read(ByteBuffer[], int, int) throws different exception from RI.
Date Tue, 18 Jul 2006 02:49:15 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-902?page=all ]

Paulex Yang resolved HARMONY-902.
---------------------------------

    Resolution: Fixed

Thanks a lot for this enhancement,  patch applied at revision 422946,  please verify this
fully resolve the problem as you expected.

> [classlib][nio] compatibility: java.nio.channels.FileChannel.read(ByteBuffer[], int,
int) throws different exception from RI.
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-902
>                 URL: http://issues.apache.org/jira/browse/HARMONY-902
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Andrew Zhang
>         Assigned To: Paulex Yang
>            Priority: Minor
>         Attachments: nio.diff
>
>
> java.nio.channels.FileChannel.read(ByteBuffer, int, int) throws different exception from
RI. Following test reproduces the bug:
>     public void test_read_ClosedChannelException() throws IOException {
>         File testFile = File.createTempFile("test", "tmp");
>         testFile.deleteOnExit();
>         FileChannel channel = new RandomAccessFile(testFile,"rw").getChannel();
>         ByteBuffer b[] = new ByteBuffer[2];
>         b[0] = null;
>         channel.close();
>         try {
>             channel.read(b, 0, 1);
>             fail("should throw ClosedChannelException");
>         } catch (ClosedChannelException e) {
>             // expected
>         }
>     }
> The test passes against RI while fails against Harmony.
> I'll upload a patch to fix this problem soon. Thanks!
> Best regards,
> Andrew

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

        

Mime
View raw message