Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-6796

ChildNodeProvider can throw NPE when adding new node, because node of prototype can be null

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.22.13
    • 2.20.14, 2.22.14, 2.24.01
    • None
    • None

    Description

      The child node provider can cause a null pointer exception when adding a new node. When the prototype is not null a copy of the prototype node will be made. But it's not guaranteed that the getNode on the prototype will return a node.

      [INFO] [talledLocalContainer] Caused by: java.lang.NullPointerException
      [INFO] [talledLocalContainer] at org.hippoecm.repository.impl.SessionDecorator.copy(SessionDecorator.java:334)
      [INFO] [talledLocalContainer] at org.hippoecm.repository.decorating.checked.SessionDecorator.copy(SessionDecorator.java:401)
      [INFO] [talledLocalContainer] at org.hippoecm.frontend.model.ChildNodeProvider.addNew(ChildNodeProvider.java:84)
      [INFO] [talledLocalContainer] at org.hippoecm.frontend.editor.plugins.field.AbstractFieldPlugin.getProvider(AbstractFieldPlugin.java:330)
      [INFO] [talledLocalContainer] at org.hippoecm.frontend.editor.plugins.field.AbstractFieldPlugin.onBeforeRender(AbstractFieldPlugin.java:303)
      [INFO] [talledLocalContainer] at org.hippoecm.frontend.editor.plugins.field.NodeFieldPlugin.onBeforeRender(NodeFieldPlugin.java:93)
      [INFO] [talledLocalContainer] at org.apache.wicket.Component.internalBeforeRender(Component.java:1069)
      [INFO] [talledLocalContainer] at org.apache.wicket.Component.beforeRender(Component.java:1103)
      [INFO] [talledLocalContainer] at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1777)

      Attachments

        Activity

          People

            jsheriff Junaidh Kadhar Sheriff
            dvandiepen Dirkjan van Diepen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: