[MAGNOLIA-6605] Fix Possible NPE and InvalidItemStateException in LastUpdatePropertyWrapper and MgnlAuditLoggingContentDecoratorPropertyWrapper Created: 17/Mar/16  Updated: 29/Mar/16  Resolved: 29/Mar/16

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 5.4.5
Fix Version/s: 5.4.6

Type: Bug Priority: Neutral
Reporter: Ilgun Ilgun Assignee: Ilgun Ilgun
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1h
Original Estimate: Not Specified

Issue Links:
causality
is causing MGNLRES-142 Using the InstallTextResourcesTask(St... 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
Sprint: Basel 36
Story Points: 2

 Description   

Problem

MgnlAuditLoggingContentDecoratorPropertyWrapper and LastUpdatePropertyWrapper tries to do some operation on the Property when their #setValue(anyObject()) is called, however, this given property may be deleted meanwhile by simply setValue(null) on Property

Solution

Exceptions may happen here if the given property is deleted. These exceptions are caused due to fact that we try to do some operations on the property.
Solution is simple, We should be storing these information beforehand and pass it to the related function instead of deleting the property and trying to do some operations on the very same property after, which obviously is causing some exceptions.


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