Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 71344 invoked from network); 8 Feb 2007 06:59:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Feb 2007 06:59:26 -0000 Received: (qmail 27810 invoked by uid 500); 8 Feb 2007 06:59:33 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 27788 invoked by uid 500); 8 Feb 2007 06:59:33 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 27779 invoked by uid 99); 8 Feb 2007 06:59:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2007 22:59:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2007 22:59:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C841142968B for ; Wed, 7 Feb 2007 22:59:05 -0800 (PST) Message-ID: <8740513.1170917945817.JavaMail.jira@brutus> Date: Wed, 7 Feb 2007 22:59:05 -0800 (PST) From: "Tony Wu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-2476) [classlib][nio]FileChannel.read(ByteBuffer) does not throw IOException if underlying file is locked. In-Reply-To: <32046448.1165337782499.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-2476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471206 ] Tony Wu commented on HARMONY-2476: ---------------------------------- So, please ingore the testcase otherwise it will fail on linux. > [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-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.