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

Bug 347379

Summary: Manifest editor Add... imported package thows NPE
Product: [Eclipse Project] PDE Reporter: Troy Bishop <tjbishop>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: curtis.windatt.public, daniel_megert, Michael_Rennie, zina
Version: 3.6.2Flags: Michael_Rennie: review+
Target Milestone: 3.6.2+   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Fix (reverse patch) none

Description Troy Bishop CLA 2011-05-26 17:19:13 EDT
Build Identifier: 

An NPE is thrown when you click Add... to add an imported package the
the manifest editor if that bundle has an export package with no version.

!ENTRY org.eclipse.ui 4 0 2011-05-26 16:47:17.882
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.pde.internal.ui.editor.plugin.ImportPackageSection.setElements(ImportPackageSection.java:512)
	at org.eclipse.pde.internal.ui.editor.plugin.ImportPackageSection.access$3(ImportPackageSection.java:474)
	at org.eclipse.pde.internal.ui.editor.plugin.ImportPackageSection$3.run(ImportPackageSection.java:415)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.pde.internal.ui.editor.plugin.ImportPackageSection.handleAdd(ImportPackageSection.java:425)
	at org.eclipse.pde.internal.ui.editor.plugin.ImportPackageSection.buttonSelected(ImportPackageSection.java:344)
	at org.eclipse.pde.internal.ui.editor.TableSection$PartAdapter.buttonSelected(TableSection.java:50)
	at org.eclipse.pde.internal.ui.parts.SharedPartWithButtons$SelectionHandler.buttonSelected(SharedPartWithButtons.java:39)
	at org.eclipse.pde.internal.ui.parts.SharedPartWithButtons$SelectionHandler.widgetSelected(SharedPartWithButtons.java:30)
...

It looks like this was fixed in HEAD via bug 341575.  Can this fix be back ported to the 3.6 maintenance stream?

Reproducible: Always

Steps to Reproduce:
See bug 341575
Comment 1 Troy Bishop CLA 2011-05-26 17:22:00 EDT
I marked this as 'major' because it is a regression from a previous 3.6.2 maintenance release due to the fix for bug 337909 introducing it.
Comment 2 Zina Mostafia CLA 2011-05-27 10:17:17 EDT
Basically we need to port the fix for bug 41575 to 3.6.2
Comment 3 Zina Mostafia CLA 2011-05-27 10:18:54 EDT
Sorry wrong in comment #2, we need the fix for bug 341575 to be ported to 3.6.2
Comment 4 Curtis Windatt CLA 2011-05-27 10:51:27 EDT
Created attachment 196770 [details]
Fix (reverse patch)

Reverse patch taken from bug 341575.
Comment 5 Curtis Windatt CLA 2011-05-27 10:52:46 EDT
Fix committed and released v20110527_r363.

Mike, please verify.
Comment 6 Michael Rennie CLA 2011-05-27 13:04:21 EDT
+1 works as intended.