### Eclipse Workspace Patch 1.0 #P util Index: src/org/aspectj/util/FileUtil.java =================================================================== RCS file: /cvsroot/tools/org.aspectj/modules/util/src/org/aspectj/util/FileUtil.java,v retrieving revision 1.31 diff -u -r1.31 FileUtil.java --- src/org/aspectj/util/FileUtil.java 15 Jul 2010 15:47:56 -0000 1.31 +++ src/org/aspectj/util/FileUtil.java 5 Feb 2011 02:09:39 -0000 @@ -34,6 +34,7 @@ import java.io.StringReader; import java.io.Writer; import java.net.MalformedURLException; +import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; @@ -1387,12 +1388,24 @@ List ret = new LinkedList(); if (urls != null) { for (int i = 0; i < urls.length; i++) { - ret.add(urls[i].getPath()); + ret.add(toPathString(urls[i])); } } return ret; } + private static String toPathString(URL url) { + try { + return url.toURI().getPath(); + } catch (URISyntaxException e) { + System.err.println("Warning!! Malformed URL may cause problems: "+url); // TODO: Better way to report this? + //In this case it was likely not using + //properly escaped characters so we just use the 'bad' method that doesn't decode + //special chars. + return url.getPath(); + } + } + /** * A pipe when run reads from an input stream to an output stream, optionally sleeping between reads. *