Bug 521675 - [9] IllegalStateException with "Working on unapplied changes" dialog
Summary: [9] IllegalStateException with "Working on unapplied changes" dialog
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: BETA J9   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 519444
Blocks:
  Show dependency tree
 
Reported: 2017-08-31 08:27 EDT by Noopur Gupta CLA
Modified: 2017-08-31 13:10 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2017-08-31 08:27:32 EDT
- Add a new external JAR on Libraries page.
- Select "Is modular" and press Edit.
- "Working on unapplied changes" dialog comes up.
- Press "Esc" key on keyboard.
We get this exception in error log:

java.lang.IllegalStateException: Unexpected answer from dialog
	at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathBasePage.showAddExportDialog(BuildPathBasePage.java:105)
	at org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWorkbookPage.editAttributeEntry(LibrariesWorkbookPage.java:521)
...
Comment 1 Stephan Herrmann CLA 2017-08-31 08:45:40 EDT
(In reply to Noopur Gupta from comment #0)
> - Add a new external JAR on Libraries page.
> - Select "Is modular" and press Edit.
> - "Working on unapplied changes" dialog comes up.
> - Press "Esc" key on keyboard.
> We get this exception in error log:
> 
> java.lang.IllegalStateException: Unexpected answer from dialog
> 	at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathBasePage.showAddExportDialog(BuildPathBasePage.java:105)
> 	at org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWorkbookPage.editAttributeEntry(LibrariesWorkbookPage.java:521)
> ...

Thanks for catching.

The truly unexpected answer is: SWT.DEFAULT (-1) (learning s.t. new every day :) ).

Obviously, Esc (or shell close for that matter) should be handled like "Cancel".