Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Currently it is not possible to warp a NodeStateDiff instance into another one for delegation. The problem is that recursion is done by the consumer of the childNodeChanged() call back which causes wrapped NodeStateDiff "to escape". To fix that I propose to separate the concerns of change notification from recursing into a subtree. For this we need an extra method createChildDiff on the NodeStateDiff interface:
/** * Create a {@code NodeStateDiff} for diffing the passed {@code before} and * {@code after} states. Returning {@code null} skips comparison for the sub * trees rooted at the passed states. * * @param name name of the child node * @param before before state of the child node * @param after after state of the child node * @return {@code NodeStateDiff} for the child node */ @CheckForNull NodeStateDiff createChildDiff(String name, NodeState before, NodeState after);