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

Bug 342176

Summary: [Tests] EUnitRunner and others should decode URLs when creating instances of File
Product: [Modeling] Epsilon Reporter: Louis Rose <louis>
Component: CoreAssignee: Louis Rose <louis>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard: interim

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