Bug 21018 - junit wizard: core exception not handled [JUnit]
Summary: junit wizard: core exception not handled [JUnit]
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Erich Gamma CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-06-26 13:28 EDT by Adam Kiezun CLA
Modified: 2003-02-06 13:40 EST (History)
0 users

See Also:


Attachments
patch (5.81 KB, patch)
2003-02-06 12:55 EST, Adam Kiezun CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-06-26 13:28:27 EDT
i already had a file called ALLTESTS.java

Java Model Exception: Core Exception [code 275] A resource exists with a 
different case: /xxxxd/sd/AllTEsts.java.
at org.eclipse.jdt.internal.core.JavaModelOperation.createFile
(JavaModelOperation.java:210)
at org.eclipse.jdt.internal.core.CreateCompilationUnitOperation.executeOperation
(CreateCompilationUnitOperation.java:105)
at org.eclipse.jdt.internal.core.JavaModelOperation.execute
(JavaModelOperation.java:305)
at org.eclipse.jdt.internal.core.JavaModelOperation.run
(JavaModelOperation.java:513)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1361)
at org.eclipse.jdt.internal.core.JavaModelManager.runOperation
(JavaModelManager.java:1212)
at org.eclipse.jdt.internal.core.JavaElement.runOperation(JavaElement.java:574)
at org.eclipse.jdt.internal.core.PackageFragment.createCompilationUnit
(PackageFragment.java:128)
at org.eclipse.jdt.ui.wizards.NewTypeWizardPage.createType
(NewTypeWizardPage.java:1234)
at 
org.eclipse.jdt.internal.junit.wizards.NewTestSuiteCreationWizardPage.updateExis
tingClass(NewTestSuiteCreationWizardPage.java:397)
at org.eclipse.jdt.internal.junit.wizards.NewTestSuiteCreationWizardPage$4.run
(NewTestSuiteCreationWizardPage.java:383)
at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute
(WorkspaceModifyDelegatingOperation.java:39)
at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:64)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1361)
at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:78)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:299)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:720)
at org.eclipse.jdt.internal.junit.wizards.JUnitWizard.finishPage
(JUnitWizard.java:45)
at 
org.eclipse.jdt.internal.junit.wizards.NewTestSuiteCreationWizard.performFinish
(NewTestSuiteCreationWizard.java:103)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:577)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:312)
at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:398)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java
(Compiled Code))
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled 
Code))
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code))
at org.eclipse.jface.window.Window.open(Window.java:537)
at org.eclipse.ui.actions.NewWizardAction.run(NewWizardAction.java:88)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:749)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java(Compiled Code))
at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java(Compiled Code))
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code))
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code))
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled 
Code))
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code))
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code))
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1160)
at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:775)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462)
at java.lang.reflect.Method.invoke(Native Method)
at org.eclipse.core.launcher.Main.basicRun(Main.java:248)
at org.eclipse.core.launcher.Main.run(Main.java:698)
at org.eclipse.core.launcher.Main.main(Main.java:534)
Comment 1 Kai-Uwe Maetzel CLA 2002-06-27 02:53:49 EDT
Please add details to reproduce.
Comment 2 Adam Kiezun CLA 2002-06-27 04:19:37 EDT
> i already had a file called ALLTESTS.java

1. create a cu called ALLTESTS.java
2. run junit test suite wizard - leave the class name as AllTests
3. finish

Comment 3 Adam Kiezun CLA 2002-06-27 04:30:49 EDT
i do not think this is a regression - it must've been there since day one
Comment 4 Dirk Baeumer CLA 2003-02-05 14:44:13 EST
This behaviour causes a NPE when pressing finish. See bug 21018.
Comment 5 Erich Gamma CLA 2003-02-05 14:54:30 EST
pls investigate
Comment 6 Adam Kiezun CLA 2003-02-06 11:07:38 EST
the npe stack trace
java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.junit.wizards.NewTestSuiteCreationWizard.postCreatingTy
pe(NewTestSuiteCreationWizard.java:113)
	at 
org.eclipse.jdt.internal.junit.wizards.NewTestSuiteCreationWizard.performFinish
(NewTestSuiteCreationWizard.java:102)
	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:417)
	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.NewWizardAction.run(NewWizardAction.java:122)
	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:1289)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1272)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	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)
Comment 7 Adam Kiezun CLA 2003-02-06 12:55:22 EST
Created attachment 3321 [details]
patch

also fixes some unused strings from WizardMessages.properties
Comment 8 Adam Kiezun CLA 2003-02-06 12:56:32 EST
please review and release if ok, re-bounce otherwise
Comment 9 Erich Gamma CLA 2003-02-06 13:40:55 EST
looks OK - released