Bug 28908 - ClassCastException in JavaProject.computePackageFragmentRoots
Summary: ClassCastException in JavaProject.computePackageFragmentRoots
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux
: P3 major (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-30 00:46 EST by Kevin O'Neill CLA
Modified: 2003-01-08 05:50 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin O'Neill CLA 2002-12-30 00:46:04 EST
If you create a custom IClassPathEntry class then
JavaProject.computePackageFragmentRoots throws an exception when the
IClassPathEntry passed to the method is cast to the internal ClasspathEntry
 
String rootID = ((ClasspathEntry)resolvedEntry).rootID();

My work around is to create an instance of ClasspathEntry rather than my custom
IClasspathEntry. This is not 100% legit as the ClasspathEntry class is in an
internal package.
Comment 1 Philipe Mulet CLA 2003-01-07 08:28:43 EST
From IClasspathEntry javadoc:

 * This interface is not intended to be implemented by clients.
 * Classpath entries can be created via methods on <code>JavaCore</code>.
Comment 2 Philipe Mulet CLA 2003-01-08 05:50:20 EST
Closing, working as designed.