Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340690 - NPE when removing locations from target definition
Summary: NPE when removing locations from target definition
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 13:21 EDT by Tim Mok CLA
Modified: 2011-03-22 14:53 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 Tim Mok CLA 2011-03-22 13:21:34 EDT
Build Identifier: Eclipse 3.7 M6 - I20110310-1119

java.lang.NullPointerException
at org.eclipse.pde.internal.core.target.P2TargetUtils.notify(P2TargetUtils.java:742)
at org.eclipse.pde.internal.core.target.P2TargetUtils.synchronize(P2TargetUtils.java:710)
at org.eclipse.pde.internal.core.target.IUBundleContainer.resolveBundles(IUBundleContainer.java:225)
at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:97)
at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:265)
at org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditor$2.run(TargetEditor.java:461)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Reproducible: Didn't try

Steps to Reproduce:
1. Created a target definition.
2. Used Save As to make a copy.
3. Started removing locations one by one from the target definition.
4. After selecting a location and clicking Remove, I got the NPE.

It's possible that the error was caused by selecting all the locations and clicking Remove, seeing that the locations were still listed, and individually removing each location.
Comment 1 Curtis Windatt CLA 2011-03-22 14:53:58 EDT
While I couldn't reproduce locally, we need an NPE guard here.  Fixed in HEAD, see P2TargetUtils.