[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: |
|
||||||||||||
| 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. |