You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/07/18 04:42:15 UTC
[jira] Assigned: (HARMONY-902) [classlib][nio] compatibility:
java.nio.channels.FileChannel.read(ByteBuffer[], int, int) throws different
exception from RI.
[ http://issues.apache.org/jira/browse/HARMONY-902?page=all ]
Paulex Yang reassigned HARMONY-902:
-----------------------------------
Assignee: Paulex Yang
> [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