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

Bug 361394

Summary: cache resolution produces wrong URI
Product: [WebTools] WTP Common Tools Reporter: Martin Lippert <mlippert>
Component: wst.internetAssignee: wst.internet-inbox <wst.internet-inbox>
Status: NEW --- QA Contact: Tim deBoer <deboer>
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Martin Lippert CLA 2011-10-19 09:19:21 EDT
Cache.getResource seems to produce wrong URIs on Windows. The 

return FILE_PROTOCOL + cacheLocation.toString() + "/" + result.getLocalFile();

can produce, for example, this:

file:///D:\XXX\XXX\.metadata\.plugins\org.eclipse.wst.internet.cache/-551705775.cache

which results in an IllegalArgumentException when passed to URI.create(..), complaining about illegal escape characters. I think it should be instead:

return cacheLocation.toURI().toString() + "/" + result.getLocalFile();