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] Resolved: (HARMONY-2476) [classlib][nio]FileChannel.read(ByteBuffer) does not throw IOException if underlying file is locked.
Date Fri, 16 Mar 2007 09:52:10 GMT

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

Richard Liang resolved HARMONY-2476.
------------------------------------

    Resolution: Fixed

Hello Tony,

The patch has been applied at revision r518905. Thanks a lot for this enhancement.

Nikolay, would you please verify this issue is fixed? Thanks a lot.

Best regards,
Richard.

> [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-all-in-one-2.diff, harmony-2476-all-in-one.diff, harmony-2476-luni.diff,
harmony-2476-nio.diff, harmony-2476-nio_newtestfile_win32.diff, harmony-2476-portlib.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