[jira] Commented: (MNG-2050) Classloader.getResource() doesn't encode blanks
[ http://jira.codehaus.org/browse/MNG-2050?page=comments#action_59519 ] Gili commented on MNG-2050: --- I don't think there is a controversity at all. ClassLoader.getResource() returns a URL. A URL *must* encode spaces using %20 to be valid. The only thing that might be controversial is whether constructing a File out of a URL which contains %20 should automatically translate those %20 back to a space. I happen to think so, but this still has nothing to do with ClassLoader.getResource() -- it *has* to encode spaces to %20. > Classloader.getResource() doesn't encode blanks > --- > > Key: MNG-2050 > URL: http://jira.codehaus.org/browse/MNG-2050 > Project: Maven 2 > Type: Bug > Components: General > Versions: 2.0.1 > Environment: win xp > Reporter: Roland Kofler > > > When I'm executing an > getClass().getClassLoader().getResource(s); > it gives back an URL encoded string in eclipse while Maven2 gives me blanks > in my URL: > * eclipse > > file:/C:/Dokumente%20und%20Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg > *maven2 > file:/C:/Dokumente und > Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg > MY PROBLEM WITH THIS: > Because of this behaviour a > new URI("file:/C:/Dokumente und > Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg") > throws a URISyntaxException. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (MNG-2050) Classloader.getResource() doesn't encode blanks
[ http://jira.codehaus.org/browse/MNG-2050?page=comments#action_59505 ] Roland Kofler commented on MNG-2050: This is an java issue since 1.4, long discussed. Sun argue that it is not a bug but a feature ;-) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4466485 It raised some controversity. I think that mavens classloader should be consistent to suns policy. > Classloader.getResource() doesn't encode blanks > --- > > Key: MNG-2050 > URL: http://jira.codehaus.org/browse/MNG-2050 > Project: Maven 2 > Type: Bug > Components: General > Versions: 2.0.1 > Environment: win xp > Reporter: Roland Kofler > > > When I'm executing an > getClass().getClassLoader().getResource(s); > it gives back an URL encoded string in eclipse while Maven2 gives me blanks > in my URL: > * eclipse > > file:/C:/Dokumente%20und%20Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg > *maven2 > file:/C:/Dokumente und > Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg > MY PROBLEM WITH THIS: > Because of this behaviour a > new URI("file:/C:/Dokumente und > Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg") > throws a URISyntaxException. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Commented: (MNG-2050) Classloader.getResource() doesn't encode blanks
[ http://jira.codehaus.org/browse/MNG-2050?page=comments#action_59460 ] Gili commented on MNG-2050: --- Confirmed, I see the same behavior on my end. > Classloader.getResource() doesn't encode blanks > --- > > Key: MNG-2050 > URL: http://jira.codehaus.org/browse/MNG-2050 > Project: Maven 2 > Type: Bug > Components: General > Versions: 2.0.1 > Environment: win xp > Reporter: Roland Kofler > > > When I'm executing an > getClass().getClassLoader().getResource(s); > it gives back an URL encoded string in eclipse while Maven2 gives me blanks > in my URL: > * eclipse > > file:/C:/Dokumente%20und%20Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg > *maven2 > file:/C:/Dokumente und > Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg > MY PROBLEM WITH THIS: > Because of this behaviour a > new URI("file:/C:/Dokumente und > Einstellungen/roland.kofler/systemone/core/target/test-classes/fsm.jpg") > throws a URISyntaxException. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]