Author: ggregory Date: Mon May 28 12:24:46 2012 New Revision: 1343224 URL: http://svn.apache.org/viewvc?rev=1343224&view=rev Log: Bug 53303 - [PATCH] ClassPath.getResource does not correctly perform URL escaping (edit)
Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java?rev=1343224&r1=1343223&r2=1343224&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java Mon May 28 12:24:46 2012 @@ -408,7 +408,7 @@ public class ClassPath implements Serial // Resource specification uses '/' whatever the platform final File file = new File(dir + File.separatorChar + name.replace('/', File.separatorChar)); try { - return file.exists() ? file.toURL() : null; + return file.exists() ? file.toURI().toURL() : null; } catch (MalformedURLException e) { return null; }