More of stack trace:

java.io.IOException: File is a Directory
        at java.io.File.createNewFile(File.java:1035)
        at java.io.File.createTempFile(File.java:1089)
        at 
tests.support.resource.Support_Resources.createTempFolder(Support_Resources.java:66)
        at 
tests.support.resource.Support_Resources.getURL(Support_Resources.java:42)
        at 
tests.api.java.util.jar.JarInputStreamTest.setUp(JarInputStreamTest.java:352)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
        at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:546)


So I see two bugs here. The first one in the implementation of java.io.File -
according to the spec createNewFile should not throw exception if file
or directory exists.

The second bug is in Support_Resources - new file might appear between
the following lines:

        folder = File.createTempFile("hyts_resources", "", null);
        folder.delete();
        folder.mkdirs();
So this should be in syncrhonized block

Can IO guys please comment?

Thanks,
Mikhail

2006/4/12, Mikhail Loenko <[EMAIL PROTECTED]>:
> I'm seeing test errors in the archive module. I've heard that Stepan have seen
> similar ones today in the morning.
>
> The errors are unstable: Stepan could not reproduce it and I did not see them
> previous time. So here they are:
>
> Class tests.api.java.util.jar.ManifestTest
>
> all tests error with:
>
> N/A
>
> java.lang.NullPointerException at
> tests.support.resource.Support_Resources.createTempFolder(Support_Resources.java:73)
> at tests.api.java.util.jar.ManifestTest.setUp(ManifestTest.java:167)
>
>
> Class tests.api.java.util.jar.JarInputStreamTest
> 9 tests error with
>
> N/A
>
> java.lang.NullPointerException at
> tests.support.resource.Support_Resources.createTempFolder(Support_Resources.java:73)
> at tests.support.resource.Support_Resources.getURL(Support_Resources.java:42)
> at 
> tests.api.java.util.jar.JarInputStreamTest.setUp(JarInputStreamTest.java:352)
>
> Ideas?
>
> Thanks,
> Mikhail
>

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to