Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OS X 10.5.6, Linux (Ubuntu)

      Description

      Minifier fails on certain JavaScript snippets. I was able to narrow it down to JavaScript which has function() definitions inside object definitions.. e.g.

      String content = " var Liferay = {" +
      " Browser: {\n" +
      " f: function()

      {\n" + " return false;\n" + " }

      \n" +
      " }\n" +
      " };";

      I found that this, when passed like:

      JavaScriptCompressor javaScriptCompressor =
      new JavaScriptCompressor(
      new BufferedReader(new StringReader(content)),
      er);

      javaScriptCompressor.compress(
      stringWriter, -1, true, false,
      false, false);

      Fails on Linux, but works on other platforms. So some kind of problem with the YUI compressor (and likely in the Rhino compiler)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                8 years, 27 weeks ago