harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Spark Shen <smallsmallor...@gmail.com>
Subject Re: [classlib][luni] java.io.File bug?
Date Fri, 20 Oct 2006 07:54:44 GMT
Tony Wu 写道:
> you mean it fails when f.setReadOnly();?
Hi Tony:

No, setReadOnly is used to change the access privilege. After this 
change harmony and RI behaves differently.

Best regards
>
> On 10/20/06, Spark Shen <smallsmallorgan@gmail.com> wrote:
>> Hi All:
>>
>> When login as 'root' under Linux, the following test case fails on
>> Harmony while passes on RI.
>> public void test_canWrite() throws IOException{
>> File f = 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
>>
>> -- 
>> 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
>>
>>
>
>


-- 
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


Mime
View raw message