Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 551238

Summary: NPE in ExtendedPropertySheetPage
Product: [Modeling] EMF Reporter: Laurent Goubet <laurent.goubet>
Component: EditAssignee: Ed Merks <Ed.Merks>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.20.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Laurent Goubet CLA 2019-09-19 05:16:44 EDT
The "control" of the PropertySheetPage may be null (during/after dispose). The fix for Bug 438123 introduced more code in "selectionChanged" that should be protected from this possibility.

From what I can see, the implementation of "refresh" should also be protected from the control being null at that point, as is done in the super implementation.

java.lang.NullPointerException
	at org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage.selectionChanged(ExtendedPropertySheetPage.java:561)
	at org.eclipse.emf.compare.ide.ui.internal.contentmergeviewer.EMFCompareContentMergeViewer$8.widgetDisposed(EMFCompareContentMergeViewer.java:751)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:127)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
Comment 1 Ed Merks CLA 2019-09-19 05:44:09 EDT
The fix is committed to master:

https://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=10e163fd4a1fd7e31926f8ccadf0bb3f5b1610af

It will be available here when the nightly build completes shortly:

https://download.eclipse.org/modeling/emf/emf/builds/nightly/latest/index.html
Comment 2 Laurent Goubet CLA 2019-09-19 07:06:10 EDT
Thanks for the quick fix!
Comment 3 Ed Merks CLA 2019-12-04 05:47:36 EST
The fixes/changes are available in 

http://download.eclipse.org/modeling/emf/emf/builds/release/2.20