Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 11740 invoked from network); 20 Oct 2006 07:55:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Oct 2006 07:55:33 -0000 Received: (qmail 86290 invoked by uid 500); 20 Oct 2006 07:55:29 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 86255 invoked by uid 500); 20 Oct 2006 07:55:29 -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 86244 invoked by uid 99); 20 Oct 2006 07:55:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 00:55:29 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.155 is neither permitted nor denied by domain of smallsmallorgan@gmail.com) Received: from [202.81.18.155] (HELO ausmtp06.au.ibm.com) (202.81.18.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Oct 2006 00:55:27 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp06.au.ibm.com (8.13.8/8.13.6) with ESMTP id k9K7ttrH6926350 for ; Fri, 20 Oct 2006 17:55:55 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.250.242]) by sd0208e0.au.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k9K7wIGY201214 for ; Fri, 20 Oct 2006 17:58:24 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k9K7sr1i009813 for ; Fri, 20 Oct 2006 17:54:53 +1000 Received: from d23m0011.cn.ibm.com (d23m0011.cn.ibm.com [9.181.32.74]) by d23av01.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k9K7snQZ009738 for ; Fri, 20 Oct 2006 17:54:52 +1000 Received: from [9.181.106.141] ([9.181.106.141]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.5.5HF262) with ESMTP id 2006102015532913-64863 ; Fri, 20 Oct 2006 15:53:29 +0800 Message-ID: <453880C4.3010401@gmail.com> Date: Fri, 20 Oct 2006 15:54:44 +0800 From: Spark Shen User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib][luni] java.io.File bug? References: <453879F0.9010107@gmail.com> <211709bc0610200043k71df7807kd68cf5b9936720bb@mail.gmail.com> In-Reply-To: <211709bc0610200043k71df7807kd68cf5b9936720bb@mail.gmail.com> X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 20/10/2006 15:53:29, Serialize by Router on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 20/10/2006 15:53:32 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Tony Wu =E5=86=99=E9=81=93: > you mean it fails when f.setReadOnly();? Hi Tony: No, setReadOnly is used to change the access privilege. After this=20 change harmony and RI behaves differently. Best regards > > On 10/20/06, Spark Shen wrote: >> Hi All: >> >> When login as 'root' under Linux, the following test case fails on >> Harmony while passes on RI. >> public void test=5FcanWrite() throws IOException{ >> File f =3D File.createTempFile("test", null); >> f.setReadOnly(); >> assertTrue(f.canWrite()); >> f.deleteOnExit(); >> } >> >> I think RI's behavior is more reasonable since the 'root' account does >> have read/write privilege for temp files. However, Harmony only treats >> 'root' as ordinary other users. >> It seems that similar problem happens on java.io.File.canRead(). >> >> As we all know, File class deals with many different file object on many >> different file system, would any one test File behavior on other file >> systems. >> >> Best regards >> >> --=20 >> Spark Shen >> China Software Development Lab, IBM >> >> >> --------------------------------------------------------------------- >> Terms of use : http://incubator.apache.org/harmony/mailing.html >> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org >> For additional commands, e-mail: harmony-dev-help@incubator.apache.org >> >> > > --=20 Spark Shen China Software Development Lab, IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org