Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361394 - cache resolution produces wrong URI
Summary: cache resolution produces wrong URI
Status: NEW
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.internet (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: wst.internet-inbox CLA
QA Contact: Tim deBoer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 09:19 EDT by Martin Lippert CLA
Modified: 2011-10-19 09:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();