Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335602

Summary: [search] Java indexing thread can index data outside of workspace
Product: [Eclipse Project] JDT Reporter: Kevin Tapperson <kevintap>
Component: CoreAssignee: Satyam Kandula <satyam.kandula>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, Olivier_Thomann
Version: 3.7   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
patch changing removeLastSegments call to only strip the last segment satyam.kandula: iplog+, satyam.kandula: review+

Description Kevin Tapperson CLA 2011-01-27 13:49:40 EST
Build Identifier: M20100909-0800

A bug in the JDT SearchParticipant class can cause the Java indexing thread to index data outside of the current workspace.

This bug is being opened in relation to eclipse bug 298977: https://bugs.eclipse.org/bugs/show_bug.cgi?id=298977.  This problem was originally located in the WST JSDT indexing code which parallels the JDT indexing code.

Reproducible: Always
Comment 1 Kevin Tapperson CLA 2011-01-27 13:50:48 EST
Created attachment 187761 [details]
patch changing removeLastSegments call to only strip the last segment

Attaching a patch for this issue.
Comment 2 Satyam Kandula CLA 2011-01-28 00:00:41 EST
Thanks for the patch. This patch looks good. I will release it after HEAD opens up for M6.
Comment 3 Satyam Kandula CLA 2011-02-03 04:08:06 EST
This problem should not really effect Java search, but the code is wrong and hence have released the patch on HEAD. 
Thanks Kevin.
Comment 4 Jay Arthanareeswaran CLA 2011-03-08 12:03:40 EST
Verified for 3.7M6 by code inspection.