Community
Participate
Working Groups
master Got hit by the NPE when running JDT perf tests. See bug 382778, comment 14 for the origin. -- Error Log from JUnit -- Class: org.eclipse.jdt.core.tests.performance.FullSourceWorkspaceSearchTests Method: testSearchBinaryMethod Actual: null Expected: null Stack Trace: java.lang.NullPointerException at org.eclipse.jdt.internal.core.search.matching.SuperTypeNamesCollector.collectSuperTypeNames(SuperTypeNamesCollector.java:231) at org.eclipse.jdt.internal.core.search.matching.SuperTypeNamesCollector.collect(SuperTypeNamesCollector.java:213) at org.eclipse.jdt.internal.core.search.matching.MethodLocator.initializePolymorphicSearch(MethodLocator.java:119) at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1238) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:95) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:231) at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:515) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:584) at org.eclipse.jdt.core.tests.performance.FullSourceWorkspaceSearchTests.search(FullSourceWorkspaceSearchTests.java:178) at org.eclipse.jdt.core.tests.performance.FullSourceWorkspaceSearchTests.testSearchBinaryMethod(FullSourceWorkspaceSearchTests.java:567) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62) at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Created attachment 217740 [details] Fix v01 The 'superclass' can be null, need to check for that before using it. + some typos found when looking around
Created attachment 217741 [details] mylyn/context/zip
The changes look good, but I think there are couple of other places that I have goofed up :(. Request you to take care of them too. The other calls in collectSuperTypeNames should have passed the argument 'path' rather than null. Can you please take care of this? Also can you please try to get a testcase both for the null and this problem? Thanks. We should get this change in 3.8.1.
(In reply to comment #3) > The other calls in collectSuperTypeNames should have passed the argument 'path' > rather than null. Can you please take care of this? Do I need to file a new bug for this or can I fix it here?
Y(In reply to comment #4) > (In reply to comment #3) > > The other calls in collectSuperTypeNames should have passed the argument 'path' > > rather than null. Can you please take care of this? > > Do I need to file a new bug for this or can I fix it here? you can fix it here.
Created attachment 217805 [details] Fix v02 Fixed nulls from comment 3, added tests for fix v01 and for the nulls.
Patch looks good.
Thanks Tom. In general, we avoid "drive by shooting" of bugs: i.e while working on some fix, if we discover problems in unrelated areas, we don't include them in the current fix, but raise a fresh defect. In particular we strive to avoid "noise diffs", reformatting, introduction of blank lines, spaces etc. However, including fixes for typos and grammatical errors is always welcome :) Thanks! Released in master via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=8d19f5a1e4b345e3efd30be48a0614ea130c9e08.
Released in 3.8 maintenance stream via http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=R3_8_maintenance&id=015a86908f6543bed31a35df10f069156ec5052e
The test run fine now. Verified for 4.3 M1 with build I20120805-2000.
Verified for 3.8.1 using Build id: M20120809-1000