Uploaded image for project: 'Liferay Apps'
  1. Liferay Apps
  2. LRA-147

[Crafter Integration Portlet]VM code needs to be updated to prevent potentiall null pointer exception or index out of bound exception

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: None
    • Labels:
      None

      Description

      VM codes in Crafter Integration portlet velocity-templates-theme need update to prevent potential null pointer exception or index out of bound exception. The following code is the problem from "office_locations_template.vm" and "single_content_template.vm".

      #set ($content = $documentsMap.get(0))

      When the documentMap object doesn't include any entry, the code will end up with index out of bound exception. We need to check if the map contains any element first and then need to try to access the first element.

      Thanks,

        Attachments

          Activity

            People

            • Assignee:
              mcalvo mcalvo
              Reporter:
              djkim Dong-Jun Kim [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support