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

NullPointerException from Expando getAttribute / getData when no data.

    Details

    • Story Points:
      1
    • Fix Priority:
      2

      Description

      If there is no expando data, you will experience null pointer exception.

      Following code will generate NullPointer exception if you run it at Scripting console.

      Packages.com.liferay.portal.service.LayoutSetLocalServiceUtil.getLayouts(-1,-1).get(0).getExpandoBridge().getAttribute("Do I get NullPointerException?");
      
      Packages.com.liferay.portlet.expando.service.ExpandoValueServiceUtil.getData(com.liferay.portal.util.PortalUtil.getCompanyIds()[0], "hello", com.liferay.portlet.expando.model.ExpandoTableConstants.DEFAULT_TABLE_NAME, "Do I get NullPointerException?", 123);
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  3 years, 17 weeks ago

                  Packages

                  Version Package