You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jochen Wiedmann (JIRA)" <ji...@codehaus.org> on 2012/07/25 11:47:21 UTC

[jira] (MSHARED-179) FilteringUtils.escapeWindowsPath only works if the Windows path is at the beginning of a property

    [ https://jira.codehaus.org/browse/MSHARED-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=304538#comment-304538 ] 

Jochen Wiedmann commented on MSHARED-179:
-----------------------------------------

Recommended workaround: Use property files in XML format and replace Properties.load with Properties.loadFromXML.

See http://www.ibm.com/developerworks/java/library/j-tiger02254/index.html

                
> FilteringUtils.escapeWindowsPath only works if the Windows path is at the beginning of a property
> -------------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-179
>                 URL: https://jira.codehaus.org/browse/MSHARED-179
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0-beta-4
>            Reporter: Dennis Lundberg
>            Assignee: Dennis Lundberg
>             Fix For: maven-filtering-1.0
>
>         Attachments: MSHARED-179.patch, MSHARED-179.zip
>
>
> If the Windows path is in the middle, like in a JDBC URL escaping is not done. Here's the code from FilteringUtils.java that causes it:
> {code:java}
>     public static final String escapeWindowsPath( String val )
>     {
>         if ( !StringUtils.isEmpty( val ) && val.indexOf( ":\\" ) == 1 )
>         ...
> {code}

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