Bug 17097

Summary: Searching for "*" in java gives a cryptic error message dialog.
Product: [Eclipse Project] JDT Reporter: Curtis d'Entremont <curtis_d'entremont>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Jason_Montojo
Version: 2.0   
Target Milestone: 2.0 F2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Curtis d'Entremont CLA 2002-05-22 17:29:54 EDT
Using Eclipse 2.0, Build F1 (buildid: 20020521) 
on Windows 2000.

NOTE: You need to have something in your workspace for this error to come up. I 
just imported org.eclipse.core.boot and this happens.

In Search->Java Search, searching for "*" with all the default options set 
gives an error message like: "An error occured during the search operation: -1".
The default options are:

Case sensitive: No
Search For: Type 
Limit To: References
Scope: Workspace

Searching for "*" anywhere else seems to behave properly (considering the 
input).
Comment 1 Jason Montojo CLA 2002-05-24 16:24:45 EDT
*** Bug 17303 has been marked as a duplicate of this bug. ***
Comment 2 Erich Gamma CLA 2002-05-26 04:37:10 EDT
The problem occurs in JDT CORE.

Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
	at 
org.eclipse.jdt.internal.core.search.matching.TypeReferencePattern.indexEntryPre
fix(TypeReferencePattern.java:140)
	at 
org.eclipse.jdt.internal.core.search.matching.AndPattern.findIndexMatches
(AndPattern.java:41)
	at 
org.eclipse.jdt.internal.core.search.matching.MultipleSearchPattern.findIndexMat
ches(MultipleSearchPattern.java:40)
	at 
org.eclipse.jdt.internal.core.search.matching.SearchPattern.findIndexMatches
(SearchPattern.java:1228)
	at org.eclipse.jdt.internal.core.search.PatternSearchJob.search
(PatternSearchJob.java:144)
	at org.eclipse.jdt.internal.core.search.PatternSearchJob.execute
(PatternSearchJob.java:93)
	at 
org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob
(JobManager.java:254)
	at org.eclipse.jdt.core.search.SearchEngine.search
(SearchEngine.java:398)
	at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute
(JavaSearchOperation.java:86)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:64)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1361)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:78)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:98)
Comment 3 Jerome Lanneluc CLA 2002-05-27 06:18:05 EDT
TypeReferencePattern.segments was created empty when it should have been a char 
array containing only '*'.

Fixed.
Comment 4 Olivier Thomann CLA 2002-06-03 14:11:37 EDT
Verified in F2.
Comment 5 Olivier Thomann CLA 2002-06-03 14:11:48 EDT
Verified.