### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java,v retrieving revision 1.67 diff -u -r1.67 MethodLocator.java --- search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 25 Apr 2006 20:39:45 -0000 1.67 +++ search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 7 Sep 2006 15:06:26 -0000 @@ -621,13 +621,14 @@ if (qualifiedPattern == null) return methodLevel; // since any declaring class will do int declaringLevel; - if (isVirtualInvoke(method, messageSend) && !(messageSend.actualReceiverType instanceof ArrayBinding)) { - declaringLevel = resolveLevelAsSubtype(qualifiedPattern, method.declaringClass); + if (isVirtualInvoke(method, messageSend) && (messageSend.actualReceiverType instanceof ReferenceBinding)) { + ReferenceBinding methodReceiverType = (ReferenceBinding) messageSend.actualReceiverType; + declaringLevel = resolveLevelAsSubtype(qualifiedPattern, methodReceiverType); if (declaringLevel == IMPOSSIBLE_MATCH) { - if (method.declaringClass == null || this.allSuperDeclaringTypeNames == null) { + if (this.allSuperDeclaringTypeNames == null) { declaringLevel = INACCURATE_MATCH; } else { - char[][] compoundName = method.declaringClass.compoundName; + char[][] compoundName = methodReceiverType.compoundName; for (int i = 0, max = this.allSuperDeclaringTypeNames.length; i < max; i++) if (CharOperation.equals(this.allSuperDeclaringTypeNames[i], compoundName)) return methodLevel; // since this is an ACCURATE_MATCH so return the possibly weaker match