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 178026 Details for
Bug 324109
[search] Java search shows incorrect results as accurate matches
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch on Head
patch.txt (text/plain), 3.23 KB, created by
Satyam Kandula
on 2010-09-02 04:48:18 EDT
(
hide
)
Description:
Patch on Head
Filename:
MIME Type:
Creator:
Satyam Kandula
Created:
2010-09-02 04:48:18 EDT
Size:
3.23 KB
patch
obsolete
>### 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 2 Sep 2010 08:46:26 -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 >@@ -616,7 +616,7 @@ > int declaringLevel = subType > ? resolveLevelAsSubtype(qualifiedPattern, method.declaringClass, null) > : resolveLevelForType(qualifiedPattern, method.declaringClass); >- return methodLevel > declaringLevel ? declaringLevel : methodLevel; // return the weaker match >+ return (methodLevel & MATCH_LEVEL_MASK) > (declaringLevel & MATCH_LEVEL_MASK) ? declaringLevel : methodLevel; // return the weaker match > } > protected int resolveLevel(MessageSend messageSend) { > MethodBinding method = messageSend.binding; >@@ -666,7 +666,7 @@ > } else { > declaringLevel = resolveLevelForType(qualifiedPattern, method.declaringClass); > } >- return methodLevel > declaringLevel ? declaringLevel : methodLevel; // return the weaker match >+ return (methodLevel & MATCH_LEVEL_MASK) > (declaringLevel & MATCH_LEVEL_MASK) ? declaringLevel : methodLevel; // return the weaker match > } > > /** >#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.204 >diff -u -r1.204 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 25 Aug 2010 11:11:31 -0000 1.204 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 2 Sep 2010 08:46:40 -0000 >@@ -12071,4 +12071,23 @@ > deleteProject("P"); > } > } >+ >+/** >+ * @bug 324109: [search] Java search shows incorrect results as accurate matches >+ * @test search of method declaration off missing types should report potential matches and not accurate. >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=324109" >+ */ >+public void testBug324109() throws CoreException { >+ this.workingCopies = new ICompilationUnit[1]; >+ this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b324109/X.java", >+ "package b324109;\n" + >+ "public class X extends A {\n" + >+ " public void run() {}\n" + >+ "}" >+ ); >+ search("Worker.run()", METHOD, DECLARATIONS); >+ assertSearchResults( >+ "src/b324109/X.java void b324109.X.run() [run] POTENTIAL_MATCH" >+ ); >+} > } >\ No newline at end of file
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 324109
:
177865
|
177866
|
177870
|
177939
| 178026