Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-228

MultiDelimiterInterpolatorFilterReaderLineEnding() does not filter after a token is escaped

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: maven-filtering-1.0
    • Fix Version/s: maven-filtering-1.1
    • Component/s: maven-filtering
    • Labels:
      None
    • 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)

      Description

      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.

        Issue Links

          Activity

          Graham Leggett created issue -
          Hide
          Graham Leggett added a comment -

          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.

          Show
          Graham Leggett added a comment - 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.
          Hide
          Graham Leggett added a comment -

          Fix and test cases for 1.1-SNAPSHOT.

          Show
          Graham Leggett added a comment - Fix and test cases for 1.1-SNAPSHOT.
          Graham Leggett made changes -
          Field Original Value New Value
          Attachment maven-filtering-MSHARED-228.patch [ 60314 ]
          Graham Leggett made changes -
          Link This issue is depended upon by MRESOURCES-166 [ MRESOURCES-166 ]
          Hide
          Olivier Lamy (*$^¨%`£) added a comment -

          Thanks!
          Just have very very quick look on the patch.
          For EOL you use '\n' ? (will that work everywhere )

          Show
          Olivier Lamy (*$^¨%`£) added a comment - Thanks! Just have very very quick look on the patch. For EOL you use '\n' ? (will that work everywhere )
          Olivier Lamy (*$^¨%`£) made changes -
          Assignee Olivier Lamy [ olamy ]
          Hide
          Graham Leggett added a comment -

          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?

          Show
          Graham Leggett added a comment - 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?
          Hide
          Olivier Lamy (*$^¨%`£) added a comment -

          correct.
          Sorry I misread the patch file.

          Show
          Olivier Lamy (*$^¨%`£) added a comment - correct. Sorry I misread the patch file.
          Hide
          Olivier Lamy (*$^¨%`£) added a comment -

          applied.
          Thanks!

          Show
          Olivier Lamy (*$^¨%`£) added a comment - applied. Thanks!
          Olivier Lamy (*$^¨%`£) made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Fix Version/s maven-filtering-1.1 [ 17197 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:14:21 UTC 2015 [ 1428239661755 ]
          Mark Thomas made changes -
          Workflow jira [ 12726221 ] Default workflow, editable Closed status [ 12764371 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 01:15:59 UTC 2015 [ 1428282959282 ]
          Mark Thomas made changes -
          Workflow jira [ 12964018 ] Default workflow, editable Closed status [ 13000535 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          4h 47m 1 Olivier Lamy (*$^¨%`£) 20/Jun/12 11:17

            People

            • Assignee:
              Olivier Lamy (*$^¨%`£)
              Reporter:
              Graham Leggett
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development