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 166008 Details for
Bug 310213
AIOOBE in IndexSelector.initializeIndexLocations()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed patch
v00.txt (text/plain), 3.41 KB, created by
Frederic Fusier
on 2010-04-24 18:12:47 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2010-04-24 18:12:47 EDT
Size:
3.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: search/org/eclipse/jdt/internal/core/search/IndexSelector.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/IndexSelector.java,v >retrieving revision 1.46 >diff -u -r1.46 IndexSelector.java >--- search/org/eclipse/jdt/internal/core/search/IndexSelector.java 8 Mar 2010 14:27:52 -0000 1.46 >+++ search/org/eclipse/jdt/internal/core/search/IndexSelector.java 24 Apr 2010 22:04:42 -0000 >@@ -202,7 +202,7 @@ > if (primaryType != null) { > char[][] qualifiedName = CharOperation.splitOn('.', primaryType.getFullyQualifiedName().toCharArray()); > char[][][] qualifiedNames = ReferenceCollection.internQualifiedNames(new char[][][] {qualifiedName}); >- focusQualifiedName = qualifiedNames[0]; >+ focusQualifiedName = qualifiedNames.length == 0 ? qualifiedName : qualifiedNames[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.196 >diff -u -r1.196 JavaSearchBugsTests.java >--- src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 8 Apr 2010 13:32:59 -0000 1.196 >+++ src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java 24 Apr 2010 22:04:51 -0000 >@@ -11785,4 +11785,52 @@ > null); > assertSearchResults(""); > } >+ >+/** >+ * @bug 310213: [search] Reference to package is not found in qualified annotation >+ * @test Ensure that references to package are also found in qualified annotation >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=310213" >+ */ >+public void testBug310213() throws CoreException { >+ boolean autoBuild = getWorkspace().isAutoBuilding(); >+ IWorkspaceDescription preferences = getWorkspace().getDescription(); >+ try { >+ // ensure that the workspace auto-build is ON >+ preferences.setAutoBuilding(true); >+ getWorkspace().setDescription(preferences); >+ >+ // create files >+ createFolder("/JavaSearchBugs/src/java/lang"); >+ createFile("/JavaSearchBugs/src/java/lang/Throwable.java", >+ "package java.lang;\n" + >+ "public class Throwable{}\n" >+ ); >+ createFolder("/JavaSearchBugs/src/b310213/test"); >+ createFile("/JavaSearchBugs/src/b310213/test/Test.java", >+ "package b310213.test;\n" + >+ "public class Test extends Throwable {\n" + >+ "}" >+ ); >+ waitUntilIndexesReady(); >+ >+ // search >+ IType type = getCompilationUnit("/JavaSearchBugs/src/java/lang/Throwable.java").getType("Throwable"); >+ search(type, REFERENCES); >+ assertSearchResults( >+ "src/b310213/test/Test.java b310213.test.Test [Throwable] EXACT_MATCH\n" + >+ ""+ getExternalJCLPathString("1.5") + " java.lang.Error EXACT_MATCH\n" + >+ ""+ getExternalJCLPathString("1.5") + " java.lang.Exception EXACT_MATCH\n" + >+ ""+ getExternalJCLPathString("1.5") + " void java.lang.Object.finalize() EXACT_MATCH" >+ ); >+ } >+ finally { >+ // put back initial setup >+ preferences.setAutoBuilding(autoBuild); >+ getWorkspace().setDescription(preferences); >+ >+ // delete files >+ deleteFolder("/JavaSearchBugs/src/b310213"); >+ deleteFolder("/JavaSearchBugs/src/java"); >+ } >+} > } >\ 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 310213
: 166008