Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342202 - NPE when Adding imported packages
Summary: NPE when Adding imported packages
Status: CLOSED DUPLICATE of bug 341575
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 14:16 EDT by Matthew Piggott CLA
Modified: 2011-04-07 14:55 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 Matthew Piggott CLA 2011-04-07 14:16:04 EDT
When editing some Manifests when I press the Add button to import a package nothing occurs and an NPE is in the Error Log (below).  It appears that the problem is the ExportPackageObject has fAttributes=null so toString() is called on a null version.

java.lang.NullPointerException
at org.eclipse.pde.internal.ui.editor.plugin.ImportPackageSection.setElements(ImportPackageSection.java:507)
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:42)
at org.eclipse.pde.internal.ui.parts.SharedPartWithButtons$SelectionHandler.widgetSelected(SharedPartWithButtons.java:33)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4150)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3739)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Remy Suen CLA 2011-04-07 14:20:14 EDT
Which build are you using, Matthew? Probably a duplicate of bug 341575.
Comment 2 Matthew Piggott CLA 2011-04-07 14:55:37 EDT
Yep, that looks like it.  Guess I didn't search very well!

*** This bug has been marked as a duplicate of bug 341575 ***