DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=35422>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35422 Summary: [io] FileUtils.toFile(URL) does not unescape %xx characters Product: Commons Version: 1.0 Final Platform: All OS/Version: Windows 2000 Status: NEW Severity: normal Priority: P2 Component: IO AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] FileUtils.toFile(URL) does not properly handle URLs with %xx escaped characters, which should be unescaped in the resulting File object (using java.net.URLDecoder.decode(String) or similar). The following JUnit tests expose the problem: public void testToFileHash() throws MalformedURLException { File expected = new File("ab#c").getAbsoluteFile(); URL url = expected.toURI().toURL(); File actual = FileUtils.toFile(url); assertEquals(expected, actual); } public void testToFileQuestionMark() throws MalformedURLException { File expected = new File("ab?c").getAbsoluteFile(); URL url = expected.toURI().toURL(); File actual = FileUtils.toFile(url); assertEquals(expected, actual); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
