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

Bug 357554

Summary: [Compatibility] ISelectionListeners that are not an implementation of INullSelectionListener gets notified of null selections
Product: [Eclipse Project] Platform Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3    
Version: 4.2   
Target Milestone: 4.2 M3   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 350080    

Description Remy Suen CLA 2011-09-13 16:07:48 EDT
I20110913-0200

1. Open the 'Functional Test Execution' perspective.
2. Activate the 'Properties' view.
3. Errors are logged.

java.lang.NullPointerException
	at org.eclipse.jubula.client.ui.controllers.JubulaStateController.reactOnChange(JubulaStateController.java:118)
	at org.eclipse.jubula.client.ui.controllers.JubulaStateController$2.selectionChanged(JubulaStateController.java:93)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:163)
	at org.eclipse.ui.internal.e4.compatibility.SelectionService.updateSelection(SelectionService.java:108)
	at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partActivated(WorkbenchPage.java:164)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$2.run(PartServiceImpl.java:191)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartActivated(PartServiceImpl.java:189)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:163)
	at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:76)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:91)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:326)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:343)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:596)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activateBranch(EclipseContext.java:601)
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:52)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:571)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:530)
	at org.eclipse.e4.ui.internal.workbench.swt.AbstractPartRenderer.activate(AbstractPartRenderer.java:105)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer$1.handleEvent(ContributedPartRenderer.java:61)
Comment 1 Remy Suen CLA 2011-09-13 16:14:38 EDT
Seems like a null selection is being forwarded even though the selection listener does not implement INullSelectionListener.
Comment 2 Remy Suen CLA 2011-09-14 11:38:34 EDT
Looks like Jubula has an implementation of ISelectionProvider that returns 'null'. This is questionable but we should still be honouring the INSL contract.
Comment 4 Remy Suen CLA 2011-10-26 09:39:01 EDT
Verified with I20111025-2000 on Windows XP.