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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Spark Shen China Software Development Lab, IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
