harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2476) [classlib][nio]FileChannel.read(ByteBuffer) does not throw IOException if underlying file is locked.
Date Thu, 08 Feb 2007 07:18:05 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471213

Tony Wu commented on HARMONY-2476:

If it is ok to add a new file for win32 only test and modify the exclude list, please have
a look at the harmony-2476-nio_newtestfile_win32.diff and ignore the harmony-2476-nio.diff.

> [classlib][nio]FileChannel.read(ByteBuffer) does not throw IOException if underlying
file is locked.
> ----------------------------------------------------------------------------------------------------
>                 Key: HARMONY-2476
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2476
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Nikolay Kuznetsov
>         Attachments: harmony-2476-luni.diff, harmony-2476-nio.diff, harmony-2476-nio_newtestfile_win32.diff,
harmony-2476-portlib.diff, test.java
> An attempt to access a file which is locked by FileChannel.lock() according to RI behavior
should result in IOException, attached test demonstrates this problem:
> RI output
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64):
> Start
> java.io.IOException: The process cannot access the file because another process has locked
a portion of the file
>         at jrockit.io.FileNativeIO.read(III)I(Native Method)
>         at jrockit.io.NativeIO.read(Ljava.io.FileDescriptor;II)I(Unknown Source)
>         at jrockit.nio.ch.IOUtil.read(Ljava.io.FileDescriptor;IIJLjrockit.io.NativeIO;Ljava.lang.Object;)I(Unknown
>         at jrockit.nio.ch.IOUtil.read(Ljava.io.FileDescriptor;Ljrockit.io.IOMemory;IJLjrockit.io.NativeIO;Ljava.lang.Object;)I(Unknown
>         at jrockit.nio.ch.IOUtil.read(Ljava.io.FileDescriptor;Ljava.nio.ByteBuffer;JLjrockit.io.NativeIO;Ljava.lang.Object;)I(Unknown
>         at jrockit.nio.ch.FileChannelImpl.read(Ljava.nio.ByteBuffer;)I(Unknown Source)
>         at test.testLockAndTryLock(test.java:47)
>         at test.main(test.java:9)
> HARMONY output:
> Start
> Must throw IOException, because file is locked

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message