[ http://jira.jboss.com/jira/browse/JBAS-363?page=history ]
Scott M Stark updated JBAS-363: ------------------------------- Description: SourceForge Submitter: andieveritt . In the constructor of org.jboss.net.protocol.file.FileURLConnection a new File is created from the supplied URL. In JDK 1.4 the result of URL.getPath() is URL encoded which means on windows with a path with a space you get 'C:\Program%20Files\foo\bar' - which doesn't work. I have tested a modified version of FileURLConnection which URL decodes the result. This resolves the issue. I have attached the modified version. The only change is on Line 45: - file = new File(url.getPath().replace('/', File.separatorChar).replace('|', ':')); + file = new File(java.net.URLDecoder.decode(url.getPath()).replace('/', File.separatorChar).replace('|', ':')); was: SourceForge Submitter: andieveritt . In the constructor of org.jboss.net.protocol.file.FileURLConnection a new File is created from the supplied URL. In JDK 1.4 the result of URL.getPath() is URL encoded which means on windows with a path with a space you get 'C:\Program%20Files\foo\bar' - which doesn't work. I have tested a modified version of FileURLConnection which URL decodes the result. This resolves the issue. I have attached the modified version. The only change is on Line 45: - file = new File(url.getPath().replace('/', File.separatorChar).replace('|', ':')); + file = new File(java.net.URLDecoder.decode(url.getPath()).replace('/', File.separatorChar).replace('|', ':')); Environment: Fix Version: JBossAS-4.0.2RC1 > FileURLConnection needs URL decode for JDK 1.4 > ---------------------------------------------- > > Key: JBAS-363 > URL: http://jira.jboss.com/jira/browse/JBAS-363 > Project: JBoss Application Server > Type: Bug > Versions: JBossAS-3.2.6 Final > Reporter: SourceForge User > Assignee: Scott M Stark > Fix For: JBossAS-3.2.7 Final, JBossAS-4.0.2RC1 > > > SourceForge Submitter: andieveritt . > In the constructor of > org.jboss.net.protocol.file.FileURLConnection a new > File is created from the supplied URL. In JDK 1.4 the > result of URL.getPath() is URL encoded which means on > windows with a path with a space you get > 'C:\Program%20Files\foo\bar' - which doesn't work. > I have tested a modified version of FileURLConnection > which URL decodes the result. This resolves the issue. > I have attached the modified version. The only change > is on Line 45: > - file = new File(url.getPath().replace('/', > File.separatorChar).replace('|', ':')); > + file = new > File(java.net.URLDecoder.decode(url.getPath()).replace('/', > File.separatorChar).replace('|', ':')); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development