Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 51710 invoked from network); 27 Jan 2006 16:22:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jan 2006 16:22:30 -0000 Received: (qmail 84851 invoked by uid 500); 27 Jan 2006 16:21:59 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 84592 invoked by uid 500); 27 Jan 2006 16:21:58 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 84562 invoked by uid 99); 27 Jan 2006 16:21:57 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jan 2006 08:21:56 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id A29DAE1 for ; Fri, 27 Jan 2006 17:21:35 +0100 (CET) Message-ID: <1807992188.1138378895660.JavaMail.jira@ajax.apache.org> Date: Fri, 27 Jan 2006 17:21:35 +0100 (CET) From: "Geir Magnusson Jr (JIRA)" To: harmony-dev@incubator.apache.org Subject: [jira] Updated: (HARMONY-50) java.io.RandomAccessFile should accept all modes that are defined in the specification, including "rws" and "rwd" In-Reply-To: <83430518.1138342893010.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-50?page=all ] Geir Magnusson Jr updated HARMONY-50: ------------------------------------- Component: Classlib > java.io.RandomAccessFile should accept all modes that are defined in the specification, including "rws" and "rwd" > ----------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-50 > URL: http://issues.apache.org/jira/browse/HARMONY-50 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Vladimir Ivanov > Assignee: Tim Ellison > Priority: Minor > > java.io.RandomAccessFile should accept all modes that are defined in the specification, including "rws" and "rwd" > Code to reproduce: > import java.io.*; > > public class test29 { > public static void main(String args[]) { > try { > File f = File.createTempFile("xxx", "yyy"); > f.deleteOnExit(); > > new RandomAccessFile(f, "rws"); > System.out.println("PASSED 1"); > } catch(Throwable e) { > System.out.println("FAILED 1: " + e); > } > try { > File f = File.createTempFile("xxx", "yyy"); > f.deleteOnExit(); > > new RandomAccessFile(f, "rwd"); > System.out.println("PASSED 2"); > } catch(Throwable e) { > System.out.println("FAILED 2: " + e); > } > } > } > Steps to Reproduce: > 1. Build Harmony (check-out on 2006-01-25) j2se subset as described in README.txt. > 2. Compile test29.java using BEA 1.4 javac > > javac -d . test29.java > 3. Run java using compatible VM (J9) > > java -showversion test29 > Output: > C:\tmp\tmp17>C:\jrockit-j2sdk1.4.2_04\bin\java.exe -showversion test29 > java version "1.4.2_04" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05) > BEA WebLogic JRockit(TM) 1.4.2_04 JVM (build ari-31788-20040616-1132-win-ia32, > Native Threads, GC strategy: parallel) > PASSED 1 > PASSED 2 > C:\tmp\tmp17>C:\harmony\trunk\deploy\jre\bin\java -showversion test29 > java version 1.4.2 (subset) > (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. > FAILED 1: java.lang.IllegalArgumentException: Mode must be one of "r" or "rw" > FAILED 2: java.lang.IllegalArgumentException: Mode must be one of "r" or "rw" > C:\tmp\tmp17> > junit test: > ------------------------ RandomAccessFileTest.java ------------------------------------------------- > import java.io.*; > import junit.framework.*; > > public class RandomAccessFileTest extends TestCase { > public void testRandomAccessFile_Mode_RWS() { > try { > File f = File.createTempFile("xxx", "yyy"); > f.deleteOnExit(); > > new RandomAccessFile(f, "rws"); > } catch(Exception e) { > fail("Unexpected exception: " + e); > } > } > public void testRandomAccessFile_Mode_RWD() { > try { > File f = File.createTempFile("xxx", "yyy"); > f.deleteOnExit(); > > new RandomAccessFile(f, "rwd"); > } catch(Exception e) { > fail("Unexpected exception: " + e); > } > } > public static void main(String[] args) { > junit.textui.TestRunner.run(RandomAccessFileTest.class); > } > } -- 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