MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-197

Obfuscation of addition statement where one of the items being added is an increment statement

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-incubating-plugins
    • Fix Version/s: 1.0.0-incubating-plugins
    • Component/s: Build
    • Labels:
      None
    • Environment:
      maven-javascript-plugin

      Description

      If you have JavaScript code like the following:

      var x = 1;
      var y = "" + ++x;

      It is a legal operation. However, if this code is run through the maven-javascript-plugin, the second line becomes something like this:

      var y=""+++x;

      This yields an invalid increment operand. Instead, the space between the "" and the "+" must be preserved. I also suspect (but have not tested) this may be a problem with this code too:

      var a = 1;
      var b = a++ + "";

      I suspect the increment and the decrement tokens in the obfuscater just need to be tagged as space sensitive (both before and after)--so we don't remove the spaces when compacting the code.

      1. obfuscator.plugin2.patch
        9 kB
        Kamran Kashanian
      2. obfuscator.plugin.patch
        9 kB
        Kamran Kashanian

        Activity

        Matthias Weßendorf made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jeff Turner made changes -
        Affects Version/s 1.0.0-incubating-plugins [ 12312491 ]
        Component/s Build [ 12311762 ]
        Fix Version/s 1.0.0-incubating-plugins [ 12312491 ]
        Jeff Turner made changes -
        Project MyFaces ADF-Faces [ 12310300 ] MyFaces Trinidad [ 12310661 ]
        Key ADFFACES-320 TRINIDAD-197
        Affects Version/s 1.0.0-incubating-plugins [ 12312333 ]
        Component/s Build [ 12311001 ]
        Fix Version/s 1.0.0-incubating-plugins [ 12312333 ]
        Matthias Weßendorf made changes -
        Fix Version/s 1.0.0-incubating-plugins [ 12312333 ]
        Affects Version/s 1.0.0-incubating-plugins [ 12312333 ]
        Matthias Weßendorf made changes -
        Assignee Adam Winer [ adamwiner ]
        Adam Winer made changes -
        Resolution Fixed [ 1 ]
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Kamran Kashanian made changes -
        Attachment obfuscator.plugin2.patch [ 12346826 ]
        Kamran Kashanian made changes -
        Attachment obfuscator.plugin.patch [ 12346598 ]
        Kamran Kashanian made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Matt Cooper created issue -

          People

          • Assignee:
            Adam Winer
            Reporter:
            Matt Cooper
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development