Project: JDT
Bug 132748 [junit] NPE in new junit suite wizard
Reported: 2006-03-21 16:39:13 | Status: resolved fixed

20060321 1. create and select import junit.framework.TestCase; public class A extends TestCase { } 2. start the JUnit suite wizard, press finish without changing anything and pressed finish without changing any fiel java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.TypeContextChecker.resolveSuperClass(TypeContextChecker.java:725) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.writeSuperClass(NewTypeWizardPage.java:2168) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.constructTypeStub(NewTypeWizardPage.java:2243) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createType(NewTypeWizardPage.java:1928) at org.eclipse.jdt.junit.wizards.NewTestSuiteWizardPage.createType(NewTestSuiteWizardPage.java:367) at org.eclipse.jdt.ui.wizards.NewTypeWizardPage$7.run(NewTypeWizardPage.java:2479) at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:68) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1736) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:851) at org.eclipse.ui.internal.progress.ProgressManager$5.run(ProgressManager.java:1130) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.progress.ProgressManager.runInUI(ProgressManager.java:1126) at org.eclipse.jdt.internal.junit.wizards.JUnitWizard.finishPage(JUnitWizard.java:66) at org.eclipse.jdt.internal.junit.wizards.NewTestSuiteCreationWizard.performFinish(NewTestSuiteCreationWizard.java:104) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355) at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:652) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3340) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2960) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:181) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3340) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2960) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1909) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1873) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:418) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:107) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:374) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java