content API: cleanup (MAGNOLIA-3015)

[MAGNOLIA-3018] content API cleanup: Content.getNodeData() should handle exceptions properly Created: 19/Jan/10  Updated: 23/Jan/13  Resolved: 18/Mar/10

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: None
Fix Version/s: 4.3

Type: Sub-task Priority: Major
Reporter: Philipp Bärfuss Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
supersession
supersedes MAGNOLIA-2746 Content api is inconsistent with rega... Closed
Template:

 Description   

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.


Generated at Mon Feb 12 03:42:23 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.