Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342176 - [Tests] EUnitRunner and others should decode URLs when creating instances of File
Summary: [Tests] EUnitRunner and others should decode URLs when creating instances of ...
Status: CLOSED FIXED
Alias: None
Product: Epsilon
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Louis Rose CLA
QA Contact:
URL:
Whiteboard: interim
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 11:05 EDT by Louis Rose CLA
Modified: 2012-02-06 10:59 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Louis Rose CLA 2011-04-07 11:05:17 EDT
EUnitRunner and some of the EOL / ETL acceptance tests attempt to load files relative to a Java class using code like:

String path = clazz.getResource(filename).getFile()
File file = new File(path);

This fails when the target file resides in a directory containing special characters (e.g. spaces), because URLs are encoded by default (e.g. "Documents and Settings" becomes "Documents%20and%Settings".
Comment 1 Louis Rose CLA 2011-04-07 11:11:06 EDT
I've replaced code like with the following:

FileUtil.getFile(filename, clazz);

in EUnitRunner, EtlTest and MultilineCommentReader

(FileUtil.getFile uses java.net.URLDecoder).
Comment 2 Louis Rose CLA 2011-04-07 11:28:01 EDT
Checked into SVN. Assigning to Dimitris for build integration; thanks!
Comment 3 Louis Rose CLA 2011-06-01 14:23:09 EDT
This was fixed no later than interim build 0.9.0.201104180016.
Comment 4 Dimitris Kolovos CLA 2011-07-25 08:17:25 EDT
Fixed in 0.9.1