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] Closed: (HARMONY-979) [classlib][nio]java.nio.channels.FileLock.release() fails to throw ClosedChannelException if the related file channel is closed.
Date Mon, 31 Jul 2006 01:52:18 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-979?page=all ]

Paulex Yang closed HARMONY-979.
-------------------------------


Verified by Andrew

> [classlib][nio]java.nio.channels.FileLock.release() fails to throw ClosedChannelException
if the related file channel is closed.
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-979
>                 URL: http://issues.apache.org/jira/browse/HARMONY-979
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Andrew Zhang
>         Assigned To: Paulex Yang
>         Attachments: nio.diff
>
>
> Hi,
>     java.nio.channels.FileLock.release() does not throw ClosedChannelException
> if the related file channel has been closed on Harmony while RI does.
>     test:
> public void test_release() throws Exception {
>         File file = File.createTempFile("test", "tmp");
>         file.deleteOnExit();
>         FileOutputStream fout = new FileOutputStream(file);
>         FileChannel fileChannel = fout.getChannel();
>         FileLock fileLock = fileChannel.lock();
>         fileChannel.close();
>         try {
>             fileLock.release();
>             fail("should throw ClosedChannelException");
>         } catch (ClosedChannelException e) {
>             // expected
>         }
>       }
> The test passes against RI while fails against Harmony.

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