Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330718 - NPE setting extra classpath entry
Summary: NPE setting extra classpath entry
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 16:51 EST by Andrew Niefer CLA
Modified: 2010-12-07 06:52 EST (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 Andrew Niefer CLA 2010-11-19 16:51:56 EST
Adding something like:
extra.. = / 
to a bundle's build.properties file will result in the following NPE:
This is not really a valid extra path entry, but we shouldn't get the NPE.


java.lang.NullPointerException
at org.eclipse.pde.internal.core.ClasspathUtilCore.getSourceZipName(ClasspathUtilCore.java:160)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addExtraLibrary(RequiredPluginsClasspathContainer.java:446)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addExtraClasspathEntries(RequiredPluginsClasspathContainer.java:343)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addExtraClasspathEntries(RequiredPluginsClasspathContainer.java:317)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspathContainer.java:155)
at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathContainer.java:88)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2660)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2792)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1924)
at org.eclipse.jdt.internal.core.JavaProject.isOnClasspath(JavaProject.java:2202)
at org.eclipse.jdt.internal.ui.BuildpathIndicatorLabelDecorator.getOverlay(BuildpathIndicatorLabelDecorator.java:47)
at org.eclipse.jdt.internal.ui.BuildpathIndicatorLabelDecorator.decorate(BuildpathIndicatorLabelDecorator.java:34)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:371)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:331)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Curtis Windatt CLA 2010-11-22 14:54:21 EST
Fixed in HEAD see REquiredPluginsClasspathContainer.  Not the most elegant solution, checks whether there are at least 2 segments in the path assuming that it is being treated as an extra library).  This works because both the project and resource name are required to add a new library entry.
Comment 2 Ankur Sharma CLA 2010-12-07 06:52:42 EST
Verified in N20101204-2000