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



##########
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:
       turns out SystemPropertySupplier is in oak-store-document so not 
available here .. unless we move that class somewhere more generic ..




----------------------------------------------------------------
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:
[email protected]


Reply via email to