[weld-issues] [JBoss JIRA] Issue Comment Edited: (WELD-834) URLScanner can not handle paths containing spaces

Štěpán Mík (JIRA) jira-events at lists.jboss.org
Wed Jun 15 11:48:29 EDT 2011


    [ https://issues.jboss.org/browse/WELD-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608904#comment-12608904 ] 

Štěpán Mík edited comment on WELD-834 at 6/15/11 11:47 AM:
-----------------------------------------------------------

I don't know much about broken URLDecoder for OSX, but it seem to me like problem of OSX Java implementation not JBoss. Clearly, URLScanner works with URLs. URLDecoder is intended to be used for converting URL to plain String. Therefore URLScanner should use URLDecoder. If URLDecoder implementation is wrong for OSX, then some set of URLs is not permitted for the whole platform. These URLs would fail in another applications too. Using custom scanner or another workarounds are (IMHO) out of scope of this bug and also out of scope of Weld itself.
So I'm suggesting to use URLDecoder and let OSX users be responsible for becoming OSX users and let them deal with their Java implementation.

      was (Author: stepanmik):
    I don't know much about broken URLDecoder for OSX, but it seem to me like problem of OSX Java implementation not JBoss. Clearly, URLScanner works with URLs. URLDecoder is intended to be used for converting URL to plain String. Therefore URLScanner should use URLDecoder. If URLDecoder implementation is wrong for OSX, then some set of URLs is not permitted for the whole platform. These URLs would fail in another applications too. Using custom scanner or another workarounds are (IMHO) out of scope of this bug and also out of scope of Weld itself.
  
> URLScanner can not handle paths containing spaces
> -------------------------------------------------
>
>                 Key: WELD-834
>                 URL: https://issues.jboss.org/browse/WELD-834
>             Project: Weld
>          Issue Type: Bug
>          Components: Bootstrap and Metamodel API
>    Affects Versions: 1.1.0.Final
>         Environment: Windows, Jetty 7.2.2
>            Reporter: Štěpán Mík
>            Assignee: Ales Justin
>             Fix For: 1.1.2.Final
>
>
> When actual classpath  includes folder that contains spaces, URLScanner throws an exception (java.io.FileNotFoundException). Problem is at line 93 where string holding URL is "converted" to path just by stripping URL scheme prefix. Unfortunately, spaces in URL are expressed either by plus sing or %20 escape sequence, which remains in file path instead of proper URL decoding. For example "file:/C:/with%20space" is converted to "/C:/with%20space" instead of "C:/with space".

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the weld-issues mailing list