Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-1814

Minifier fails on Linux and possibly Mac

    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

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            cygnusecks James Falkner (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              10 years, 12 weeks, 2 days ago

                Packages

                Version Package