[MAGNOLIA-3049] NPEs in FileProperties in case of missing content/properties Created: 01/Feb/10  Updated: 23/Jan/13  Resolved: 01/Feb/10

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

Type: Bug Priority: Major
Reporter: Fabrizio Giustina Assignee: Fabrizio Giustina
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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

 Description   

If you try to use info.magnolia.cms.beans.runtime.FileProperties you may easily end up with a NPE, if the content does not exist or also if you are requesting the file size when not available.
We should add a few checks.



 Comments   
Comment by Fabrizio Giustina [ 01/Feb/10 ]

added a few null checks

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