Summary: | NPE in PackageExplorerContentProvider.getPackageFragmentRoots() | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jörg von Frantzius <jfrantzius> | ||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | eclipse, jerome_lanneluc, n.a.edgar, Olivier_Thomann | ||||||
Version: | 3.3 | ||||||||
Target Milestone: | 3.3 M7 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Jörg von Frantzius
2006-10-24 12:31:00 EDT
We're getting null as result of IPackageFragmentRoot#getRawClasspathEntry(). *** Bug 182857 has been marked as a duplicate of this bug. *** This indicates that the package fragment root is no longer on the classpath. We should throw a not present exception instead of returning null. Created attachment 64934 [details]
Proposed patch
Not sure that message for the JME is the good one. Jerome, any advice on this point?
I code for the Java model status should not be INVALID_CLASSPATH (the classpath is still valid here) but ELEMENT_NOT_ON_CLASSPATH. So if the raw entry is null, we should: throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH, this)) Created attachment 65008 [details]
New proposed patch
Thanks Jerome, here's the new patch including your recommended changes.
New patch looks good. Released for 3.3 M7 in HEAD stream. Verified for 3.3M7 with I20070427-0010 *** Bug 174015 has been marked as a duplicate of this bug. *** *** Bug 176429 has been marked as a duplicate of this bug. *** |