From 5e71bd5fa17358fb91675f6903a1d3988147f0f8 Mon Sep 17 00:00:00 2001 From: Julian Reschke Date: Fri, 13 Dec 2024 14:21:53 +0100 Subject: [PATCH] OAK-11304: Remove usage of Guava Collections2 - improve array constructors --- .../oak/spi/security/authorization/accesscontrol/ACE.java | 2 +- .../authorization/accesscontrol/AbstractAccessControlList.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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