You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Graham Leggett (JIRA)" <ji...@codehaus.org> on 2012/06/20 12:30:21 UTC

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Graham Leggett created MSHARED-228:
--------------------------------------

             Summary: MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
                 Key: MSHARED-228
                 URL: https://jira.codehaus.org/browse/MSHARED-228
             Project: Maven Shared Components
          Issue Type: Bug
          Components: maven-filtering
    Affects Versions: maven-filtering-1.0
         Environment: java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)

            Reporter: Graham Leggett


When an attempt is made to filter the following string:

export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}

The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.

Expected:

export SERVER_ENV=${SERVER_ENV:sandbox}

Actual:

export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}

Patch to follow.


--
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

        

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Posted by "Graham Leggett (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSHARED-228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Graham Leggett updated MSHARED-228:
-----------------------------------

    Attachment: maven-filtering-MSHARED-228.patch

Fix and test cases for 1.1-SNAPSHOT.
                
> MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-228
>                 URL: https://jira.codehaus.org/browse/MSHARED-228
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0
>         Environment: java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Graham Leggett
>         Attachments: maven-filtering-MSHARED-228.patch
>
>
> When an attempt is made to filter the following string:
> export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
> The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.
> Expected:
> export SERVER_ENV=${SERVER_ENV:sandbox}
> Actual:
> export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
> Patch to follow.

--
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

        

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Posted by "Graham Leggett (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHARED-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301509#comment-301509 ] 

Graham Leggett commented on MSHARED-228:
----------------------------------------

Turned out there were many edge cases not covered by the original code, and arbitrary assumptions made (such as the closing token only works if it is one character long), so my only option to fix this was to rewrite the filter parsing code.

Patch attached, new tests, all existing tests pass.

                
> MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-228
>                 URL: https://jira.codehaus.org/browse/MSHARED-228
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0
>         Environment: java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Graham Leggett
>
> When an attempt is made to filter the following string:
> export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
> The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.
> Expected:
> export SERVER_ENV=${SERVER_ENV:sandbox}
> Actual:
> export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
> Patch to follow.

--
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

        

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSHARED-228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy reassigned MSHARED-228:
------------------------------------

    Assignee: Olivier Lamy
    
> MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-228
>                 URL: https://jira.codehaus.org/browse/MSHARED-228
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0
>         Environment: java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Graham Leggett
>            Assignee: Olivier Lamy
>         Attachments: maven-filtering-MSHARED-228.patch
>
>
> When an attempt is made to filter the following string:
> export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
> The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.
> Expected:
> export SERVER_ENV=${SERVER_ENV:sandbox}
> Actual:
> export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
> Patch to follow.

--
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

        

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Posted by "Graham Leggett (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHARED-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301513#comment-301513 ] 

Graham Leggett commented on MSHARED-228:
----------------------------------------

I didn't do anything special with respect to EOL, just used what was there before to match the existing style - is the svn:eol-style property set correctly for the project?

                
> MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-228
>                 URL: https://jira.codehaus.org/browse/MSHARED-228
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0
>         Environment: java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Graham Leggett
>            Assignee: Olivier Lamy
>         Attachments: maven-filtering-MSHARED-228.patch
>
>
> When an attempt is made to filter the following string:
> export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
> The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.
> Expected:
> export SERVER_ENV=${SERVER_ENV:sandbox}
> Actual:
> export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
> Patch to follow.

--
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

        

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHARED-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301519#comment-301519 ] 

Olivier Lamy commented on MSHARED-228:
--------------------------------------

correct.
Sorry I misread the patch file.
                
> MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-228
>                 URL: https://jira.codehaus.org/browse/MSHARED-228
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0
>         Environment: java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Graham Leggett
>            Assignee: Olivier Lamy
>         Attachments: maven-filtering-MSHARED-228.patch
>
>
> When an attempt is made to filter the following string:
> export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
> The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.
> Expected:
> export SERVER_ENV=${SERVER_ENV:sandbox}
> Actual:
> export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
> Patch to follow.

--
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

        

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSHARED-228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MSHARED-228.
--------------------------------

       Resolution: Fixed
    Fix Version/s: maven-filtering-1.1

applied.
Thanks!
                
> MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-228
>                 URL: https://jira.codehaus.org/browse/MSHARED-228
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0
>         Environment: java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Graham Leggett
>            Assignee: Olivier Lamy
>             Fix For: maven-filtering-1.1
>
>         Attachments: maven-filtering-MSHARED-228.patch
>
>
> When an attempt is made to filter the following string:
> export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
> The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.
> Expected:
> export SERVER_ENV=${SERVER_ENV:sandbox}
> Actual:
> export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
> Patch to follow.

--
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

        

[jira] (MSHARED-228) MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSHARED-228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=301512#comment-301512 ] 

Olivier Lamy commented on MSHARED-228:
--------------------------------------

Thanks!
Just have very very quick look on the patch.
For EOL you use '\n' ? (will that work everywhere :-) )
                
> MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped
> -------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-228
>                 URL: https://jira.codehaus.org/browse/MSHARED-228
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0
>         Environment: java version "1.6.0_33"
> Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-10M3720)
> Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
>            Reporter: Graham Leggett
>         Attachments: maven-filtering-MSHARED-228.patch
>
>
> When an attempt is made to filter the following string:
> export SERVER_ENV=\${SERVER_ENV:${httpd.server.env}}
> The escape character "\" ends up escaping the entire token, or failing that the entire line, and the filter "${httpd.server.env}" is unresolved.
> Expected:
> export SERVER_ENV=${SERVER_ENV:sandbox}
> Actual:
> export SERVER_ENV=${SERVER_ENV:${httpd.server.env}}
> Patch to follow.

--
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