[MAGNOLIA-5246] PropertyUtil.getString should not throw NPE when node is null Created: 19/Aug/13  Updated: 20/Aug/13  Resolved: 20/Aug/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 4.5.11, 5.0.3, 5.1

Type: Bug Priority: Neutral
Reporter: Milan Divilek Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MGNLCAT-89 Prevent NPEs at CategorySyndicator Closed
is depended upon by MGNLSTK-1225 Prevent NPEs at PageSyndicator Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

info.magnolia.jcr.util.PropertyUtil.getString(Node, String) and info.magnolia.jcr.util.PropertyUtil.getString(Node, String, String) should not throw NPE when node is null instead of it they should return default value.



 Comments   
Comment by Federico Grilli [ 20/Aug/13 ]

testGetStringReturnDefaultValueWhenNodeIsNull() - no need to call getString() on String object.

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