You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2021/02/09 14:25:21 UTC

[GitHub] [jackrabbit-oak] mreutegg commented on a change in pull request #269: OAK-9134 : backport to 1.22 from trunk

mreutegg commented on a change in pull request #269:
URL: https://github.com/apache/jackrabbit-oak/pull/269#discussion_r572925950



##########
File path: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/write/NodeTypeRegistry.java
##########
@@ -89,9 +93,34 @@ public static void register(Root root, InputStream input, String systemId) {
 
     private void registerNodeTypes(InputStream stream, String systemId) {
         try {
-            CndImporter.registerNodeTypes(
-                    new InputStreamReader(stream, Charsets.UTF_8),
-                    systemId, ntMgr, nsReg, vf, false);
+            Reader reader = new InputStreamReader(stream, Charsets.UTF_8);
+            // OAK-9134: nt:frozenNode is not implementing mix:referenceable from JCR 2.0.
+            // This system property allows to add it back when initializing a repository.
+            final String referenceableFrozenNodeProperty = "oak.referenceableFrozenNode";
+            final boolean referenceableFrozenNode;
+            if (System.getProperty(referenceableFrozenNodeProperty) == null) {
+                // the default for referenceableFrozenNode is true in the 1.22 branch.
+                // this is in contrast to it being false in newer versions.
+                // the reason for choosing true as the default is to maintain higher
+                // backwards compatibility and minimize an otherwise high impact in this branch.
+                referenceableFrozenNode = true;
+            } else {
+                referenceableFrozenNode = Boolean.getBoolean(referenceableFrozenNodeProperty);
+            }

Review comment:
       To reduce divergence, what do you think about backporting OAK-9010 and then use a `SystemPropertySupplier`? The only difference then would be the default value when calling the factory method.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org