rishabhdaim commented on code in PR #1141:
URL: https://github.com/apache/jackrabbit-oak/pull/1141#discussion_r1351719204
##########
oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/version/VersionEditor.java:
##########
@@ -108,9 +112,15 @@ public void propertyAdded(PropertyState after)
&& this.after.hasProperty(JcrConstants.JCR_VERSIONHISTORY)
&& !this.after.hasProperty(JCR_ISCHECKEDOUT)
&& !this.before.exists()) {
- // sentinel node for restore
- vMgr.restore(node, after.getValue(Type.REFERENCE), null);
- return;
+ Tree tree = new
TreeProviderService().createReadOnlyTree(this.node.getNodeState());
+ if (vMgr.getNodeTypeManager().isNodeType(
+ TreeUtil.getPrimaryTypeName(tree),
TreeUtil.getMixinTypeNames(tree), MIX_VERSIONABLE)) {
Review Comment:
Shouldn't this be replaced by `isVersionable()`.
Both are using the same underlying apis and `isVersionable()` caches the
results in `Boolean` as well.
--
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]