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.
Build: NetBeans IDE Dev (Build 201509030002) VM: Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Java(TM) SE Runtime Environment, 1.8.0_51-b16 OS: Linux User Comments: jkovalsky: I created JUnit tests for "teststorun" package, then run "Test" action from project's popup menu which showed that all tests failed, then I deleted "teststorun" package under "TestPackages" node and then I double clicked some failed test in "Test Results" window to navigate to the test e.g. "testDoSomething". Exception was thrown. I know I should not have deleted the tests and then trying to navigate to them but still exception is not the right communication channel. :) Stacktrace: java.lang.NullPointerException at org.netbeans.modules.maven.junit.ui.MavenJUnitTestMethodNode.getTestcaseFileObject(MavenJUnitTestMethodNode.java:138) at org.netbeans.modules.maven.junit.ui.MavenJUnitNodeOpener.openCallstackFrame(MavenJUnitNodeOpener.java:191) at org.netbeans.modules.java.testrunner.ui.api.UIJavaUtils.openCallstackFrame(UIJavaUtils.java:114) at org.netbeans.modules.java.testrunner.ui.api.JumpAction$1.run(JumpAction.java:95) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
Created attachment 155870 [details] stacktrace
could not reproduce jirka: - is this reproducible? - what project type - could it be there was more to the scenario then described? when clicking on a failed test after the package was deleted i've just got the message #221053: unknown location: com/mycompany/mavenproject125/newpackage/NewClassTest.java classname:com.mycompany.mavenproject125.newpackage.NewClassTest, stacktrace: in the log, but no exception. from the incriminated code line at org.netbeans.modules.maven.junit.ui.MavenJUnitTestMethodNode.getTestcaseFileObject(MavenJUnitTestMethodNode.java:138) it is hard to say what was null: - either the project - or FileLocator from lookup changed the place so that it will be more obvious in case the problem is reproduced in the future jet-main #2578674ecffe
Integrated into 'main-silver', will be available in build *201509080002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/2578674ecffe User: Tomas Stupka <tstupka@netbeans.org> Log: Issue #254980 - NullPointerException at org.netbeans.modules.maven.junit.ui.MavenJUnitTestMethodNode.getTestcaseFileObject - non functional change for easier diagnostic in case NPE occurs
No, it's not reproducible Tomasi. :| The only related thing from messages.log file is this warning but I doubt it could help: INFO [org.netbeans.modules.maven.junit.ui.MavenJUnitNodeOpener]: #221053: unknown location: org/netbeans/test/bug_254980/teststorun/AbstractThingTest.java classname:org.netbeans.test.bug_254980.teststorun.AbstractThingTest, stacktrace: Tested in: Product Version: NetBeans IDE Dev (Build 201509090002) Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27 System: Linux version 3.13.0-37-generic running on amd64; UTF-8; cs_CZ (nb)