Skip to content

Commit 87bf0b4

Browse files
authored
Update NativeBroker.java
1 parent 05dca9b commit 87bf0b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exist-core/src/main/java/org/exist/storage/NativeBroker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ private Tuple2<Boolean, Collection> getOrCreateCollectionExplicit_rootCollection
744744
final CollectionCache collectionCache, final Optional<Tuple2<Permission, Long>> creationAttributes)
745745
throws TriggerException, ReadOnlyException, PermissionDeniedException, LockException, IOException {
746746

747-
if(!parentCollection.getPermissionsNoLock().validate(getCurrentSubject(), Permission.WRITE)){
747+
if(parentCollection != null && !parentCollection.getPermissionsNoLock().validate(getCurrentSubject(), Permission.WRITE)){
748748
throw new PermissionDeniedException("No write permissions for " + parentCollection.getURI().getCollectionPath());
749749
}
750750

0 commit comments

Comments
 (0)