diff --git a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/ACE.java b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/ACE.java index 1018fc654de..c590a7b0f2b 100644 --- a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/ACE.java +++ b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/ACE.java @@ -111,7 +111,7 @@ public boolean isAllow() { @NotNull @Override public String[] getRestrictionNames() { - return restrictions.stream().map(this::getJcrName).toArray(String::new); + return restrictions.stream().map(this::getJcrName).toArray(String[]::new); } @Nullable diff --git a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlList.java b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlList.java index 76c648a0f98..1929b0b3227 100644 --- a/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlList.java +++ b/oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/AbstractAccessControlList.java @@ -103,7 +103,7 @@ public int size() { public String[] getRestrictionNames() { return getRestrictionProvider().getSupportedRestrictions(getOakPath()). stream().map(definition -> namePathMapper.getJcrName(definition.getName())). - toArray(String::new); + toArray(String[]::new); } @Override