Bug 87539

Summary: ITypeHierarchy.getAllSupertypes() does not return java.lang.Object for java.awt.GraphicsCallback$PrintAllCallback
Product: [Eclipse Project] JDT Reporter: Yaniv Inbar <yaniv>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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.