### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java,v retrieving revision 1.57 diff -u -r1.57 JavaSearchBugsTests.java --- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 8 Dec 2005 16:25:06 -0000 1.57 +++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 14 Dec 2005 17:49:10 -0000 @@ -46,7 +46,7 @@ // org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true; // TESTS_PREFIX = "testBug110336"; // TESTS_NAMES = new String[] { "testBug110336e" }; -// TESTS_NUMBERS = new int[] { 110291, 110422 }; +// TESTS_NUMBERS = new int[] { 120816 }; // TESTS_RANGE = new int[] { 83304, -1 }; } @@ -5590,6 +5590,8 @@ } /** + +/** * @test Bug 119545: [search] Binary java method model elements returned by SearchEngine have unresolved parameter types * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=119545" */ @@ -5610,4 +5612,50 @@ ""+ getExternalJCLPathString("1.5") + " boolean java.lang.Object.equals(java.lang.Object) EXACT_MATCH" ); } + +/** + * @test Bug 120816: [search] NullPointerException at ...jdt.internal.compiler.lookup.SourceTypeBinding.getMethods + * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=120816" + */ +public void testBug120816a() throws CoreException { + workingCopies = new ICompilationUnit[2]; + workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b120816/Test.java", + "package b120816;\n" + + "public class Test {\n" + + " String foo(E e) { return \"\"; }\n" + + "}\n" + ); + workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b120816/Sub.java", + "package b120816;\n" + + "public class Sub extends Test {\n" + + " String foo(RuntimeException e) { return \"\"; }\n" + + " String foo(Exception e) {\n" + + " return super.foo(e);\n" + + " }\n" + + "}\n" + ); + search("* String (Exception)", METHOD, DECLARATIONS); + assertSearchResults( + "src/b120816/Sub.java String b120816.Sub.foo(Exception) [foo] EXACT_MATCH" + ); +} +public void testBug120816b() throws CoreException { + workingCopies = new ICompilationUnit[1]; + workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b120816/Test.java", + "package b120816;\n" + + "public class Test {\n" + + " String foo(E e) { return \"\"; }\n" + + "}\n" + + "class Sub extends Test {\n" + + " String foo(RuntimeException e) { return \"\"; }\n" + + " String foo(Exception e) {\n" + + " return super.foo(e);\n" + + " }\n" + + "}\n" + ); + search("* String (Exception)", METHOD, DECLARATIONS); + assertSearchResults( + "src/b120816/Test.java String b120816.Sub.foo(Exception) [foo] EXACT_MATCH" + ); +} } #P org.eclipse.jdt.core Index: buildnotes_jdt-core.html =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/buildnotes_jdt-core.html,v retrieving revision 1.4809 diff -u -r1.4809 buildnotes_jdt-core.html --- buildnotes_jdt-core.html 14 Dec 2005 17:28:05 -0000 1.4809 +++ buildnotes_jdt-core.html 14 Dec 2005 17:49:19 -0000 @@ -41,6 +41,23 @@ + + +


+Eclipse Platform Build Notes
+Java Development Tooling Core

+Eclipse SDK 3.2M5 - ??th January 2006 +
Project org.eclipse.jdt.core v_632 +(cvs). +

+What's new in this drop

+
    +
+ +

Problem Reports Fixed

+120816 +[search] NullPointerException at ...jdt.internal.compiler.lookup.SourceTypeBinding.getMethods +


Eclipse Platform Build Notes
@@ -57,7 +74,6 @@ 120902 Member.getJavadocRange() causes AIOOBE -


Eclipse Platform Build Notes
Index: compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java,v retrieving revision 1.95 diff -u -r1.95 BlockScope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java 24 Nov 2005 19:06:31 -0000 1.95 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java 14 Dec 2005 17:49:21 -0000 @@ -499,7 +499,7 @@ if ((mask & Binding.FIELD) != 0 && (binding = findField(typeBinding, nextName, invocationSite, true /*resolve*/)) != null) { if (!binding.isValidBinding()) return new ProblemFieldBinding( - (FieldBinding)binding, + ((ProblemFieldBinding)binding).closestMatch, CharOperation.subarray(compoundName, 0, currentIndex), binding.problemId()); break; // binding is now a field 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.62 diff -u -r1.62 MethodLocator.java --- search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 7 Dec 2005 21:21:19 -0000 1.62 +++ search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java 14 Dec 2005 17:49:23 -0000 @@ -255,7 +255,7 @@ return level; } private boolean matchOverriddenMethod(ReferenceBinding type, MethodBinding method, MethodBinding matchMethod) { - if (type == null) return false; + if (type == null || this.pattern.selector == null) return false; // matches superclass if (!type.isInterface() && !CharOperation.equals(type.compoundName, TypeConstants.JAVA_LANG_OBJECT)) {