Community
Participate
Working Groups
HEAD of TypeHierarchy#getAllSuperInterfaces(IType) and #getAllSupertypes(IType) start with: ArrayList supers = new ArrayList(); if (this.typeToSuperInterfaces.get(type) == null) { return NO_TYPE; } It looks like typeToSuperInterfaces.get(type) is an empty array if the type is in the hierarchy but has not super interfaces. => The optimization only works for types that are not in the hierarchy. In #getAllSupertypes(IType), the check for emptiness would even be wrong if it worked, since the method would return an empty array even if the type is a subclass of Object.
Created attachment 110592 [details] Proposed fix and tests This fix returns the empty array NO_TYPE if the type has no super types/interfaces or if it doesn't exit in the hierarchy. It also avoids the creation of the ArrayList object if threre is no super types/interfaces.
Fix and tests released for 3.5M2
Verified for 3.5M2 using I20080914-2000