You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2022/12/18 14:11:02 UTC

[jackrabbit-oak] branch OAK-10038 created (now 9bcaf34a52)

This is an automated email from the ASF dual-hosted git repository.

reschke pushed a change to branch OAK-10038
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


      at 9bcaf34a52 OAK-10038: CompositeStoreIT: add workaround for potential NPE in test

This branch includes the following new commits:

     new 9bcaf34a52 OAK-10038: CompositeStoreIT: add workaround for potential NPE in test

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[jackrabbit-oak] 01/01: OAK-10038: CompositeStoreIT: add workaround for potential NPE in test

Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch OAK-10038
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 9bcaf34a52936c59d600357bf71d67b465cebab9
Author: Julian Reschke <ju...@gmx.de>
AuthorDate: Sun Dec 18 15:10:42 2022 +0100

    OAK-10038: CompositeStoreIT: add workaround for potential NPE in test
---
 .../oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java     | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java
index 9803e5cb82..5df639fb67 100644
--- a/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java
+++ b/oak-store-composite/src/main/java/org/apache/jackrabbit/oak/composite/checks/NodeTypeDefinitionNodeStoreChecker.java
@@ -75,6 +75,11 @@ public class NodeTypeDefinitionNodeStoreChecker implements MountedNodeStoreCheck
         NodeBuilder rootBuilder = new ReadOnlyBuilder(root); // prevent accidental changes
         
         String primary = root.getName(JCR_PRIMARYTYPE);
+        // workaround until https://issues.apache.org/jira/browse/OAK-9863 is fixed
+        if (primary == null) {
+            // no primary type for root node found (probably empty segment store used for testing)
+            return false;
+        }
         Iterable<String> mixins = root.getNames(JCR_MIXINTYPES);
         try {
             Set<String> checkNodeTypeNames = context.getAllNodeTypeNames();