Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-678

Plugin ODF: possible NPE when no language node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.9.18, 2.9.20
    • 2.9.17
    • Plugins (others)
    • None

      JCREntity.getProperty()
      Node nodeLanguage = getLanguageNode(language);
      if (nodeLanguage.hasProperty(propertyName))
      {
         return nodeLanguage.getProperty(propertyName);
      }
      

      If the content doesn't have a language node, getLanguageNode() returns null and a NPE is thrown on the next line. The nullity of nodeLanguage should be tested before calling hasProperty() on it.

            Unassigned Unassigned
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: