Bug 323213 - [search] Wrongs results while searching for a type in default package
Summary: [search] Wrongs results while searching for a type in default package
Status: VERIFIED DUPLICATE of bug 324189
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Satyam Kandula CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 02:44 EDT by Dani Megert CLA
Modified: 2011-01-27 03:03 EST (History)
2 users (show)

See Also:


Attachments
Screenshot (46.81 KB, image/png)
2010-08-20 03:07 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2010-08-20 02:44:12 EDT
Broken since R3.4.

1. start with a new workspace
2. paste the following snippet into the Package Explorer:
public class s {}
3. create package 'a'
3. in the Package Explorer use mouse to move s.java into 'a'
==> error dialog (see attached screen shot), no exception

Putting the found references into the Search view reveals strange matches.

Filed against JDT Core since this is probably a search engine issue.
Comment 1 Dani Megert CLA 2010-08-20 03:07:22 EDT
Created attachment 177065 [details]
Screenshot
Comment 2 Frederic Fusier CLA 2010-08-20 05:08:32 EDT
Not so funny for me as it seems I introduced it... :-S

Satyam, please investigate, thanks
Comment 3 Satyam Kandula CLA 2011-01-27 01:33:52 EST
Need to use Sun JDK 1.6 to reproduce this problem.
Bug in CharOperation.match() causes wrong match when the start and the end characters match the pattern. 
The patch attached in bug 324189 comment 32 fixes the problem.

*** This bug has been marked as a duplicate of bug 324189 ***
Comment 4 Dani Megert CLA 2011-01-27 03:03:12 EST
Verified in I20110126-1800.