harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Liang (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-2476) [classlib][nio]FileChannel.read(ByteBuffer) does not throw IOException if underlying file is locked.
Date Fri, 09 Feb 2007 06:57:07 GMT

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

Richard Liang reassigned HARMONY-2476:
--------------------------------------

    Assignee: Richard Liang

> [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
>         Assigned To: Richard Liang
>         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
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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message