Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-145

Delivery endpoint returns exception when childNodeType has no sub configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.2
    • None
    • None
    • None
    • Saigon 127, Saigon 128, Saigon 129
    • 1

      If you include the childNodeTypes item in a delivery configuration, and it has no configured items "under" it - then requests will get an exception:

      java.lang.NullPointerException: null
      	at info.magnolia.rest.delivery.jcr.filter.FilteringContentDecoratorBuilder.wrapNodeIterator(FilteringContentDecoratorBuilder.java:115) ~[magnolia-rest-content-delivery-2.0-SNAPSHOT.jar:?]
      

      To reproduce, use this configuration

        stories:
          depth: 1
          includeSystemProperties: true
          bypassWorkspaceAcls: true
          #rootPath: /grandparent
          rootPath: /stories-demo2
          nodeTypes:
            0: mgnl:composition
          childNodeTypes:
          limit: 1
      

      Expected behaviour is that no child nodes will be returned in the response.

        Acceptance criteria

              dai.ha Dai Ha
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1d Original Estimate - 1d
                  1d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 2d
                  2d