### 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.89 diff -u -r1.89 MethodLocator.java --- search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 19 Jun 2009 14:43:48 -0000 1.89 +++ search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 31 Aug 2010 17:26:03 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -677,7 +677,7 @@ * Returns IMPOSSIBLE_MATCH if it doesn't. */ protected int resolveLevelAsSubtype(char[] qualifiedPattern, ReferenceBinding type, TypeBinding[] argumentTypes) { - if (type == null) return INACCURATE_MATCH; + if (type == null || !type.isValidBinding()) return INACCURATE_MATCH; int level = resolveLevelForType(qualifiedPattern, type); if (level != IMPOSSIBLE_MATCH) { @@ -690,7 +690,9 @@ // matches superclass if (!type.isInterface() && !CharOperation.equals(type.compoundName, TypeConstants.JAVA_LANG_OBJECT)) { - level = resolveLevelAsSubtype(qualifiedPattern, type.superclass(), argumentTypes); + ReferenceBinding superclass = type.superclass(); + if (superclass == null || !superclass.isValidBinding()) return INACCURATE_MATCH; + level = resolveLevelAsSubtype(qualifiedPattern, superclass, argumentTypes); if (level != IMPOSSIBLE_MATCH) { if (argumentTypes != null) { // need to verify if method may be overridden