You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Christoph Leiter (JIRA)" <ji...@apache.org> on 2012/04/22 12:31:34 UTC

[jira] [Created] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Christoph Leiter created WICKET-4509:
----------------------------------------

             Summary: Spaces in path cause ModifcationWatcher to fail
                 Key: WICKET-4509
                 URL: https://issues.apache.org/jira/browse/WICKET-4509
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.5.5
         Environment: Windows 7
            Reporter: Christoph Leiter


The ModificationWatcher isn't able to reload resource files if there's a space in the path.

The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268520#comment-13268520 ] 

Peter Ertl commented on WICKET-4509:
------------------------------------

@Sven: In 6.x, can we move UrlDecoder into wicket-util?
                
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>            Assignee: Sven Meier
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Meier reassigned WICKET-4509:
----------------------------------

    Assignee: Sven Meier
    
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>            Assignee: Sven Meier
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259217#comment-13259217 ] 

Sven Meier commented on WICKET-4509:
------------------------------------

In your patch url.getFile() misses any protocol information, thus the following invocation of Files#getLocalFileFromUrl(String) always returns null.
                
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Christoph Leiter (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christoph Leiter updated WICKET-4509:
-------------------------------------

    Attachment: WICKET-4509.patch

Attaching patch. All current test cases pass.
                
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4509.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.0-RC1
                   1.5.6
    
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>            Assignee: Sven Meier
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Peter Ertl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268521#comment-13268521 ] 

Peter Ertl commented on WICKET-4509:
------------------------------------

^ and add some comment in the migration-wiki?
                
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>            Assignee: Sven Meier
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259245#comment-13259245 ] 

Sven Meier commented on WICKET-4509:
------------------------------------

I've changed #getLocalFileFromUrl(URL) to decode the url before passing it on to the other method.

Regretfully Wicket's UrlDecoder is not accessible from wicket-util, so I've just used Java's default URLDecoder.
                
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>            Assignee: Sven Meier
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4509) Spaces in path cause ModifcationWatcher to fail

Posted by "Sven Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13268681#comment-13268681 ] 

Sven Meier commented on WICKET-4509:
------------------------------------

Yes, UrlDecoder could be moved. This would definitely warrant a comment in the migration-wiki ;).
                
> Spaces in path cause ModifcationWatcher to fail
> -----------------------------------------------
>
>                 Key: WICKET-4509
>                 URL: https://issues.apache.org/jira/browse/WICKET-4509
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>         Environment: Windows 7
>            Reporter: Christoph Leiter
>            Assignee: Sven Meier
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: WICKET-4509.patch
>
>
> The ModificationWatcher isn't able to reload resource files if there's a space in the path.
> The problem is that Files#getLocalFileFromUrl(String) receives an URL encoded String in which spaces are encoded to %20. They are never decoded and passed to File(). The fix is not to use the external representation of an URL but the file representation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira