Bug 87539 - ITypeHierarchy.getAllSupertypes() does not return java.lang.Object for java.awt.GraphicsCallback$PrintAllCallback
Summary: ITypeHierarchy.getAllSupertypes() does not return java.lang.Object for java.a...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-09 13:55 EST by Yaniv Inbar CLA
Modified: 2005-04-07 09:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yaniv Inbar CLA 2005-03-09 13:55:09 EST
To see the problem, run this piece of JUnit plugin test code.  You will have 
to implement getJavaProject():

    public void check(String className) throws Exception {
        // getJavaProject() simply gets any java project with rt.jar on
        // classpath
        final IType currentType = getJavaProject().findType(className);
        final IType[] superTypes = currentType.newSupertypeHierarchy(null)
                .getAllSupertypes(currentType);
        for (int i = 0; i < superTypes.length; i++) {
            IType type = superTypes[i];
            if (type.getFullyQualifiedName().equals("java.lang.Object"))
                return;
        }
        fail("Object is not a super type of '" + className + "'");
    }

    public void testEclipse() throws Exception {
        check("java.awt.GraphicsCallback");
        check("java.awt.GraphicsCallback$PrintAllCallback");
    }
Comment 1 Jerome Lanneluc CLA 2005-04-07 09:24:12 EDT
Cannot reproduce. Please reopen if you have specific steps.