reschke commented on code in PR #1899:
URL: https://github.com/apache/jackrabbit-oak/pull/1899#discussion_r1883910254
##########
oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/accesscontrol/ACE.java:
##########
@@ -112,7 +111,7 @@ public boolean isAllow() {
@NotNull
@Override
public String[] getRestrictionNames() {
- return Collections2.transform(restrictions,
this::getJcrName).toArray(new String[restrictions.size()]);
+ return restrictions.stream().map(this::getJcrName).toArray(size -> new
String[size]);
Review Comment:
But that won't pre-allocate the array with the suggested size, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]