### 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.75 diff -u -r1.75 MethodLocator.java --- search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 25 Apr 2007 16:59:23 -0000 1.75 +++ search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 18 Jul 2007 14:55:17 -0000 @@ -334,7 +334,7 @@ // verify closest match if pattern was bound // (see bug 70827) if (focus != null && focus.getElementType() == IJavaElement.METHOD) { - if (methodBinding != null) { + if (methodBinding != null && methodBinding.declaringClass != null) { boolean isPrivate = Flags.isPrivate(((IMethod) focus).getFlags()); if (isPrivate && !CharOperation.equals(methodBinding.declaringClass.sourceName, focus.getParent().getElementName().toCharArray())) { return; // finally the match was not possible