Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
None
-
None
Description
We clone Node wrappers both in DelegateNodeWrapper.deepUnwrap() and in ChildWrappingNodeWrapper.wrapNode(). In both instances we simply change the wrapped node and trust the subclass to do additional setup as required. However changing the wrapped node directly can be problematic depending on what the subclass wants to do.
For instance, LazyNodeWrapper keeps its node reference locally in a field so this doesn't get updated during cloning.
DelegateNodeWrapper should have a method:
protected void initClone(Node newNode)
or similar to allow subclasses to act appropriately on cloning.
Checklists
Acceptance criteria