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

Bug 316824

Summary: [Help] Search Index makes remote server calls when building if remote priority preference is selected - Fix in Eclipse 3.6.1
Product: [Eclipse Project] Platform Reporter: Jim Perry <perryja>
Component: User AssistanceAssignee: Chris Goldthorpe <cgold>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: cgold, kutzi
Version: 4.0   
Target Milestone: 3.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
JUnit
none
JUnits (version 2)
none
Patch none

Description Jim Perry CLA 2010-06-14 16:40:39 EDT
Build Identifier: eclipse-SDK-3.6RC4-win32

When the Search Index is building, it constructs a series of help:// URLs for retrieving the index documents.  With the introduction of remote help priority in Eclipse 3.6, help:// URLs first go to the remote information center to check for the content which causes the Search Index to make remote calls when building, unlike in releases previous to Eclipse 3.6 which would search locally first, and therefore never run into this problem.

When the input stream for a help:// URL is read, Eclipse needs to know if this is an index call, and if so, search locally rather than honoring the remote priority preference.

HelpURLConnection.getInputStream() is likely where the changes need to be made.

Reproducible: Always

Steps to Reproduce:
1. Navigate to Window -> Preferences -> Help -> Content and point to a remote infocenter.
2. Select the radio button "Include remote help and give it priority"
3. Open the help system via Help -> Contents, and do a search.  The index will build, but will make remote calls for the remaining index documents (that weren't preindexed)
Comment 1 Chris Goldthorpe CLA 2010-06-15 18:04:39 EDT
Created attachment 171999 [details]
JUnit

These two tests will check that no remote calls are made during an index operation - currently these tests fail because of this bug and will pass after it is fixed.
Comment 2 Chris Goldthorpe CLA 2010-06-15 18:21:01 EDT
Created attachment 172002 [details]
JUnits (version 2)
Comment 3 Chris Goldthorpe CLA 2010-06-16 16:17:04 EDT
Created attachment 172071 [details]
Patch
Comment 4 Jim Perry CLA 2010-06-25 18:27:45 EDT
Reviewed the patch.  Tested the local only case, as well as both remote priority options with positive results.  The search index calls were interpreted as local only and avoided the incorrect remote call. 

This fix looks complete.
Comment 5 Chris Goldthorpe CLA 2010-06-25 18:38:35 EDT
Patch applied to 3.6 maintenance stream, Fixed.