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

Wrong xpath selector in PortletDataContextImpl.getImportDataGroupElement() causing NPE

    Details

      Description

      PortletDataContextImpl.getImportDataGroupElement() tries to find a given element in the internal data structure _importDataRootElement. 

      The selector is ".//" + name, which doesn't adhere to xpath specification completely. Thus, not all libraries interpret it correctly. In particular, the one bundled with Liferay doesn't find 'name', returning EMPTY-ELEMENT, which in turn will generate NPE.

      It seems that, at some point, using ".//" works, and if it is removed, subsequent errors are created. The solution must, then, preserve the previous behaviour.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alberto.montero Alberto Montero
                Reporter:
                alberto.montero Alberto Montero
                Participants of an Issue:
                Recent user:
                Alberto Montero
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  17 weeks ago

                  Packages

                  Version Package
                  Master