sungwy commented on code in PR #3999:
URL: https://github.com/apache/polaris/pull/3999#discussion_r3031052894
##########
polaris-core/src/main/java/org/apache/polaris/core/auth/AuthorizationRequest.java:
##########
@@ -75,18 +78,15 @@ default List<PolarisSecurable> getTargets() {
@Nonnull
@Value.Derived
default List<PolarisSecurable> getSecondaries() {
- List<PolarisSecurable> secondaries = new ArrayList<>();
- for (AuthorizationTargetBinding targetBinding : getTargetBindings()) {
- if (targetBinding.getSecondary() != null) {
- secondaries.add(targetBinding.getSecondary());
- }
- }
- return secondaries;
+ return getTargetBindings().stream()
+ .map(AuthorizationTargetBinding::getSecondary)
+ .filter(Objects::nonNull)
+ .toList();
Review Comment:
beautification / consistency with above
--
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]