Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 31762 Details for
Bug 120816
[search] NullPointerException at ...jdt.internal.compiler.lookup.SourceTypeBinding.getMethods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch to fix this issue
v00.txt (text/plain), 6.01 KB, created by
Frederic Fusier
on 2005-12-14 12:51:27 EST
(
hide
)
Description:
Patch to fix this issue
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2005-12-14 12:51:27 EST
Size:
6.01 KB
patch
obsolete
>### 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<E> {\n" + >+ " String foo(E e) { return \"\"; }\n" + >+ "}\n" >+ ); >+ workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b120816/Sub.java", >+ "package b120816;\n" + >+ "public class Sub extends Test<Exception> {\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<E> {\n" + >+ " String foo(E e) { return \"\"; }\n" + >+ "}\n" + >+ "class Sub extends Test<Exception> {\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 @@ > </td> > </tr> > </table> >+ >+<a name="v_632"></a> >+<p><hr><h1> >+Eclipse Platform Build Notes<br> >+Java Development Tooling Core</h1> >+Eclipse SDK 3.2M5 - ??th January 2006 >+<br>Project org.eclipse.jdt.core v_632 >+(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_632">cvs</a>). >+<h2> >+What's new in this drop</h2> >+<ul> >+</ul> >+ >+<h3>Problem Reports Fixed</h3> >+<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=120816">120816</a> >+[search] NullPointerException at ...jdt.internal.compiler.lookup.SourceTypeBinding.getMethods >+ > <a name="v_631"></a> > <p><hr><h1> > Eclipse Platform Build Notes<br> >@@ -57,7 +74,6 @@ > <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=120902">120902</a> > Member.getJavadocRange() causes AIOOBE > >- > <a name="v_630"></a> > <p><hr><h1> > Eclipse Platform Build Notes<br> >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)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 120816
:
31718
| 31762