harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2476) [classlib][nio]FileChannel.read(ByteBuffer) does not throw IOException if underlying file is locked.
Date Tue, 05 Dec 2006 16:56:24 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-2476?page=all ]

Nikolay Kuznetsov updated HARMONY-2476:
---------------------------------------

    Attachment: test.java

> [classlib][nio]FileChannel.read(ByteBuffer) does not throw IOException if underlying
file is locked.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2476
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2476
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Nikolay Kuznetsov
>         Attachments: 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
Source)
>         at jrockit.nio.ch.IOUtil.read(Ljava.io.FileDescriptor;Ljrockit.io.IOMemory;IJLjrockit.io.NativeIO;Ljava.lang.Object;)I(Unknown
Source)
>         at jrockit.nio.ch.IOUtil.read(Ljava.io.FileDescriptor;Ljava.nio.ByteBuffer;JLjrockit.io.NativeIO;Ljava.lang.Object;)I(Unknown
Source)
>         at jrockit.nio.ch.FileChannelImpl.read(Ljava.nio.ByteBuffer;)I(Unknown Source)
>         at test.testLockAndTryLock(test.java:47)
>         at test.main(test.java:9)
> PASS
> HARMONY output:
> Start
> Must throw IOException, because file is locked

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