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

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0.2
    • None
    • None
    • None

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

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