On 18/01/2012 12:01, Konstantin Kolinko wrote: > 2012/1/18 <ma...@apache.org>: >> Author: markt >> Date: Wed Jan 18 11:51:53 2012 >> New Revision: 1232843 >> >> URL: http://svn.apache.org/viewvc?rev=1232843&view=rev >> Log: >> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52480 >> When converting class path entries from URLs to files/directories, >> ensure that any URL encoded characters are converted. Fixes JSP >> compilation with javac when Tomcat is installed at a path that includes >> spaces. > > > I wonder why this code performs substring() calls upon textual value of the > URL. > Couldn't it just call URL.getPath() ?
Slight differences in the result I think. Mainly leading '/' characters. > (In the opposite way the conversion would be done via > file.toURI().toURL().toExternalForm() ) File.toURI().toURL() is how the URLs are constructed in the first place. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org