Dominik Süß created SLING-11483:
-----------------------------------
Summary: NodePropertiesVisitor causing session writes on set
properties without changed properties
Key: SLING-11483
URL: https://issues.apache.org/jira/browse/SLING-11483
Project: Sling
Issue Type: Bug
Reporter: Dominik Süß
Executing Repoinit twice without contradicting statements should cause no
writes, so the session returned by the visitors should return false for
session.hasPendingChanges()
The way the NodePropertiesVisitor is implemented the properties are always
written if this is no defaults statement. While this satisfies the contract
that for "default" there should be no writes in case properties are already
present it does even cause a write in case there are no changes what so ever.
The behavior of JCR is that in case the same properties are written this is
equivalent to a touch (and would likely update the last modified field,
although not verified) Adding a comparison for the set scenario to avoid
writting properties if the target state already matches the definition
eliminates the false change indicator.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)