Project: JDT
Bug 80393 NPE in AllTypesCache.getTypes()
Reported: 2004-12-07 12:56:36 | Status: resolved fixed

reported by Christof Marti: running performance tests on 3.0 resulted in the following NPE. It seems that AllTypesCache.getAllTypes can return null and that AllTypesCache.getTypes() doesn't check for this. java.lang.NullPointerException at org.eclipse.jdt.internal.corext.util.AllTypesCache.getTypes(AllTypesCache.java:246) at org.eclipse.jdt.text.tests.performance.EditorTestHelper.joinBackgroundActivities(EditorTestHelper.java: 243) at org.eclipse.jdt.text.tests.performance.PerformanceTestSetup.setUp(PerformanceTestSetup.java:76) at junit.extensions.TestSetup$1.protect(TestSetup.java:18) at junit.extensions.TestSetup.run(TestSetup.java:23) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestDecorator.run(TestDecorator.java:28) at org.eclipse.jdt.text.tests.performance.CloseWorkbenchDecorator.run(CloseWorkbenchDecorator.java: 31) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:320) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:196) at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:188) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:106) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2749) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2434) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:131) at org.eclipse.test.UITestApplication.run(UITestApplication.java:58) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.eclipse.core.launcher.Main.basicRun(Main.java:183) at org.eclipse.core.launcher.Main.run(Main.java:644) at org.eclipse.core.launcher.Main.main(Main.java:628)

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/AllTypesCache.java