Skip to content

Commit

Permalink
OAK-10038: CompositeStoreIT: add workaround for potential NPE in test (
Browse files Browse the repository at this point in the history
  • Loading branch information
reschke committed Dec 18, 2022
1 parent b47503b commit b07057d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ public void onConstraintViolation(String path, List<String> typeNames, int code,
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();
Expand Down

0 comments on commit b07057d

Please sign in to comment.