Community
Participate
Working Groups
was: Bug 541493 - NPE after assertNotNull in FileSystemResourceManagerTest java.lang.NullPointerException at org.eclipse.core.internal.localstore.FileSystemResourceManager.updateLocalSync(FileSystemResourceManager.java:1094) at org.eclipse.core.internal.localstore.FileSystemResourceManager.write(FileSystemResourceManager.java:1182) at org.eclipse.core.tests.internal.localstore.FileSystemResourceManagerTest$WriteFileContents.run(FileSystemResourceManagerTest.java:511) ...
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/176136
So the idea is to replace a NullPointerException by an IllegalStateException, or is there more substance/fix?
To introduce a better exception is only a workaround. If someone would find the root reason why that state sometimes(!) happens on jenkins would help. until now nobody could even find the error since the exception was missing.
The error is reproducable in FileSystemResourceManagerTest.testWriteFile() see https://ci.eclipse.org/platform/job/eclipse.platform.resources-Gerrit/1503/testReport/junit/org.eclipse.core.tests.internal.localstore/AllTests/testWriteFile/ Ther error happens when the asynchronous workplace refresh thread detects that the "file" was deleted and marking it with DataTreeLookup.isPresent=false. When then (Race condition) the test tries to write into that file it fails because isPresent==false. If the test is faster then the workplace refresh no error is thrown. I dont know enough about that test. So i cannot say if the test is wrong or if there is a problem in the productive code. Someone knows what behaviour that is intended there? I just was confused that this test randomly invalidated another commit.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/176136 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=bb74d4c7ac103c87dfdef68b4189584bc6b7abac
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/176250
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178395
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.resources/+/178395 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=2fef0814c893d3f766abea81bbe32d09fdfa337e