### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java,v retrieving revision 1.117 diff -u -r1.117 BinaryTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 19 Mar 2009 17:39:40 -0000 1.117 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java 13 May 2009 19:36:25 -0000 @@ -910,6 +910,9 @@ public boolean isGenericType() { return this.typeVariables != Binding.NO_TYPE_VARIABLES; } +public boolean isHierarchyConnected() { + return (this.tagBits & TagBits.HasUnresolvedSuperclass) == 0 && (this.tagBits & TagBits.HasUnresolvedSuperinterfaces) == 0; +} public int kind() { if (this.typeVariables != Binding.NO_TYPE_VARIABLES) return Binding.GENERIC_TYPE; Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java,v retrieving revision 1.113 diff -u -r1.113 ParameterizedTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 12 May 2009 20:49:56 -0000 1.113 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 13 May 2009 19:36:26 -0000 @@ -733,6 +733,10 @@ return false; } + public boolean isHierarchyConnected() { + return this.superclass != null && this.superInterfaces != null; + } + /** * @see org.eclipse.jdt.internal.compiler.lookup.Substitution#isRawSubstitution() */ Index: compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java,v retrieving revision 1.172 diff -u -r1.172 SourceTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 28 Apr 2009 16:53:03 -0000 1.172 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java 13 May 2009 19:36:26 -0000 @@ -1059,6 +1059,9 @@ public boolean isGenericType() { return this.typeVariables != Binding.NO_TYPE_VARIABLES; } +public boolean isHierarchyConnected() { + return (this.tagBits & TagBits.EndHierarchyCheck) != 0; +} public ReferenceBinding[] memberTypes() { return this.memberTypes; } Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java,v retrieving revision 1.132 diff -u -r1.132 ReferenceBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 7 Mar 2009 00:59:02 -0000 1.132 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java 13 May 2009 19:36:26 -0000 @@ -1064,6 +1064,13 @@ return (this.tagBits & TagBits.EndHierarchyCheck) == 0 && (this.tagBits & TagBits.BeginHierarchyCheck) != 0; } +/** + * Returns true if the type hierarchy is connected + */ +public boolean isHierarchyConnected() { + return true; +} + public boolean isInterface() { // consider strict interfaces and annotation types return (this.modifiers & ClassFileConstants.AccInterface) != 0; Index: compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java,v retrieving revision 1.73 diff -u -r1.73 TypeVariableBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java 12 May 2009 20:49:56 -0000 1.73 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java 13 May 2009 19:36:26 -0000 @@ -316,6 +316,10 @@ return false; } + public boolean isHierarchyConnected() { + return (this.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0; + } + /** * Returns true if the 2 variables are playing exact same role: they have * the same bounds, providing one is substituted with the other: = 1.5 mode, ensure the exactMatch did not match raw types if (compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) for (int i = argumentTypes.length; --i >= 0;) - if (isSubtypeOfRawType(argumentTypes[i])) + if (isPossibleSubtypeOfRawType(argumentTypes[i])) return null; // must find both methods for this case: void foo() {} and N foo() { return null; } // or find an inherited method when the exact match is to a bridge method @@ -2995,7 +2995,7 @@ return false; } - public boolean isSubtypeOfRawType(TypeBinding paramType) { + public boolean isPossibleSubtypeOfRawType(TypeBinding paramType) { TypeBinding t = paramType.leafComponentType(); if (t.isBaseType()) return false; @@ -3004,6 +3004,7 @@ int nextPosition = 0; do { if (currentType.isRawType()) return true; + if (!currentType.isHierarchyConnected()) return true; // do not fault in super types right now, so assume one is a raw type ReferenceBinding[] itsInterfaces = currentType.superInterfaces(); if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {