This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
From time to time tests fail due to a problem in MemoryFileSystem. I am not quite sure, but I expect that if one calls: p = fo.getParent(); n = fo.getName(); fo.delete(); fo.isFolder(); // !!!! p.createFolder(n); then the sequence may fail sometime. The problem is likely that folder method calls e, which creates and registers the entry and then it is not possible to do the createFolder or rename, etc. java.io.IOException: File already exists at org.openide.filesystems.MemoryFileSystem.createData(MemoryFileSystem.java:141) at org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java:381) at org.openide.filesystems.FileObject.createData(FileObject.java:599) at org.openide.loaders.FolderInstanceTest.doTestListenersCount(FolderInstanceTest.java:134) at org.openide.loaders.FolderInstanceTest.testListenersCountWithCookie(FolderInstanceTest.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at org.openide.loaders.FolderInstanceTest.runTest(FolderInstanceTest.java:72) at org.netbeans.junit.NbTestCase.runBare(NbTestCase.java:136) 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 org.netbeans.junit.NbTestCase.run(NbTestCase.java:123) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:176) at org.netbeans.xtest.testrunner.JUnitTestRunner.runTests(JUnitTestRunner.java:127) at org.netbeans.xtest.plugin.jvm.JUnitTestRunnerLauncher.main(JUnitTestRunnerLauncher.java:41)
I am not sure, but I think this failure is also related to the same problem: testOPermutationOfAlt: java.lang.ClassNotFoundException: From file: AbstractFileObject@80f4cb[nbfs://nbhost/MemoryFileSystem/Shortcuts/OD-F6.instance] due to: java.lang.NullPointerException at org.openide.loaders.InstanceSupport.instanceClass(InstanceSupport.java:143) at org.openide.loaders.InstanceDataObject$Ser.instanceClass(InstanceDataObject.java:1121) at org.openide.loaders.InstanceSupport.instanceCreate(InstanceSupport.java:197) at org.openide.loaders.InstanceDataObject$Ser.instanceCreate(InstanceDataObject.java:1180) at org.openide.loaders.InstanceDataObject.instanceCreate(InstanceDataObject.java:692) at org.netbeans.core.ShortcutsFolder.acceptDataObject(ShortcutsFolder.java:128) at org.openide.loaders.FolderInstance.defaultProcessObjects(FolderInstance.java:650) at org.openide.loaders.FolderInstance.access$000 (FolderInstance.java:68) at org.openide.loaders.FolderInstance$2.run(FolderInstance.java:622) at org.openide.util.Task.run(Task.java:207) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:419) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:794)
/cvs/openide/fs/src/org/openide/filesystems/MemoryFileSystem.java,v <-- new revision: 1.3; previous revision: 1.2 /cvs/openide/fs/test/unit/src/org/openide/filesystems/MemoryFSTestHid.java,v <-- initial revision: 1.1 /cvs/openide/fs/test/unit/src/org/openide/filesystems/MemoryFileSystemTest.java,v new revision: 1.2; previous revision: 1.1
Reopened, fix must be improved.
Fixed. /cvs/openide/fs/src/org/openide/filesystems/MemoryFileSystem.java,v <-- new revision: 1.5; previous revision: 1.4 /cvs/openide/fs/test/unit/src/org/openide/filesystems/MemoryFileSystemTest.java,v new revision: 1.4; previous revision: 1.3