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

Java enums make soy template engine fail

    Details

      Description

      When an enum is added to a SoyContext or template the rendering fails with an exception.


       

      Steps to reproduce in master:

      1. Start portal
      2. Deploy com.liferay.hello.soy.web.jar (overwriting portal's provided hello soy bundle)
      3. Navigate to http://localhost:8080
      4. Add a Hello Soy Portlet to the page

      Expected results:

      1. Portlet should be rendered

      Actual results:

      1. Rendering fails with a server exception

       

      Steps to reproduce in 7.0:

      1. Start portal
      2. Expand soy-params-7-0.zip
      3. Deploy the JAR file inside the build/lib subfolder of the expanded ZIP
      4. Navigate to http://localhost:8080
      5. Add a Sample Portlet to the page

      Expected results:

      1. Portlet should render the strings:
        Enum: VALUE
        HTML: bold

      Actual results:

      1. Portlet renders a Java object dump instead of VALUE

       

      Steps to reproduce in 7.1:

      1. Start portal
      2. Expand soy-params-7-1.zip
      3. Deploy the JAR file inside the build/lib subfolder of the expanded ZIP
      4. Navigate to http://localhost:8080
      5. Add a Sample Portlet to the page

      Expected results:

      1. Portlet should render the strings:
        Enum: VALUE
        HTML: bold

      Actual results:

      1. Portlet renders a Java object dump instead of VALUE

       

       

        Attachments

        1. com.liferay.hello.soy.web.jar
          401 kB
        2. LPS-86694_master.png
          LPS-86694_master.png
          58 kB
        3. soy-params-7-0.zip
          423 kB
        4. soy-params-7-1.zip
          378 kB

          Issue Links

            Activity

              People

              • Assignee:
                john.co John Co
                Reporter:
                ivan.zaera Ivan Zaera
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  40 weeks ago

                  Packages

                  Version Package
                  7.0.0 DXP FP64
                  7.0.X
                  7.1.10 DXP FP5
                  7.1.10.1 SP1
                  7.1.2 CE GA3
                  7.1.X
                  Master