Bug 30991 NPE in New Java Project Wizard
Given an existing project named 'Test', 1. Start 'New Java Project' Wizard 2. Enter name 'test'. 3. Click Finish. 4. Error Dialog "..A resource exists with different case: /Test." 5. Click OK 6. Enter any other name i.e. 'foo' 7. Click Finish 8. Error dialog appears, NPE in LOG. !ENTRY org.eclipse.jdt.ui 4 10001 Feb 05, 2003 12:43:42.483 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:716) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish (NewElementWizard.java:86) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:570) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:308) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.jface.window.Window.runEventLoop(Window.java:561) at org.eclipse.jface.window.Window.open(Window.java:541) at org.eclipse.ui.actions.NewProjectAction.run (NewProjectAction.java:97) at org.eclipse.jface.action.Action.runWithEvent(Action.java:804) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:450) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:398) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:392) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:72) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1240) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1223) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: java.lang.NullPointerException at org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage.configureJavaProject (JavaCapabilityConfigurationPage.java:198) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizardPage.performFinish (NewProjectCreationWizardPage.java:130) at org.eclipse.jdt.internal.ui.wizards.NewProjectCreationWizard.finishPage (NewProjectCreationWizard.java:56) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run (NewElementWizard.java:79) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation (BatchOperation.java:34) at org.eclipse.jdt.internal.core.JavaModelOperation.execute (JavaModelOperation.java:337) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:665) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1580) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2607) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:32) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:296) ... 34 more
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewProjectCreationWizardPage.java
} finally {
			monitor.done();
		}
	}
	
	/**
	 * Called from the wizard on finish.
	 */
	public void performFinish(IProgressMonitor monitor) throws CoreException, InterruptedException {
		try {
			monitor.beginTask(NewWizardMessages.getString("NewProjectCreationWizardPage.createproject.desc"), 3);				 
			if (fCurrProject == null) {
				updateProject(true, new SubProgressMonitor(monitor, 1));
			}
			configureJavaProject(new SubProgressMonitor(monitor, 2));
		} finally {
			monitor.done();
		}
	}
	private void removeProject() {
		if (fCurrProject == null || !fCurrProject.exists()) {
			return;
		}
		
		IRunnableWithProgress op= new IRunnableWithProgress() {
			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
				boolean noProgressMonitor= Platform.getLocation().equals(fCurrProjectLocation);
				if (monitor == null || noProgressMonitor) {
					monitor= new NullProgressMonitor();
				}