Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3015 content API: cleanup
  3. MAGNOLIA-3018

content API cleanup: Content.getNodeData() should handle exceptions properly

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Major Major
    • 4.3
    • None
    • core
    • None

      Content.getNodeData(name) doesn't define any throws declaration. To be compliant to the former implementation (4.2) we will do the following:

      • PathNotFound: return EmptyNodeData instance
      • AccessDenied: return EmptyNodeData instance

      setValue will fail always, but getString(), .. methods will return default values.

      Because of the amount of usages we decided against adding a throws declaration. We might rethink that in the future but for now it is far the safest/cleanest solution.

            pbaerfuss Philipp Bärfuss
            pbaerfuss Philipp Bärfuss
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: