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 177939 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 to test
patch.txt (text/plain), 2.72 KB, created by
Satyam Kandula
on 2010-09-01 07:46:30 EDT
(
hide
)
Description:
Patch to test
Filename:
MIME Type:
Creator:
Satyam Kandula
Created:
2010-09-01 07:46:30 EDT
Size:
2.72 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 1 Sep 2010 11:37:20 -0000 >@@ -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 > (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 > (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 1 Sep 2010 11:37:24 -0000 >@@ -61,7 +61,7 @@ > // Debug > static { > // org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true; >-// TESTS_NAMES = new String[] {"testBug306223"}; >+ TESTS_NAMES = new String[] {"testBug324109"}; > } > > public JavaSearchBugsTests(String name) { >@@ -12071,4 +12071,18 @@ > deleteProject("P"); > } > } >+ >+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( >+ "" >+ ); >+} > } >\ 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