stefan-egli commented on code in PR #874:
URL: https://github.com/apache/jackrabbit-oak/pull/874#discussion_r1143663923


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/AbstractDocumentNodeState.java:
##########
@@ -127,6 +128,48 @@ public boolean compareAgainstBaseState(NodeState base, 
NodeStateDiff diff) {
                     }
                 }
             }
+        } else if (base instanceof ModifiedNodeState) {
+            ModifiedNodeState mBase = (ModifiedNodeState) base;
+            if (mBase.getBaseState() == this) {
+                // this is the base state of the ModifiedNodeState
+                // do a reverse comparison and report the inverse back to 
NodeStateDiff
+                return mBase.compareAgainstBaseState(this, new NodeStateDiff() 
{

Review Comment:
   (interesting approach. I'm wondering if it could be useful for other cases)
   Would it make sense to move this into its own class and have dedicated test 
case for this reversing?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to