flyrain commented on code in PR #211:
URL: https://github.com/apache/polaris/pull/211#discussion_r1731969950


##########
polaris-service/src/main/java/org/apache/polaris/service/catalog/IcebergCatalogAdapter.java:
##########
@@ -171,28 +173,39 @@ public Response updateProperties(
         .build();
   }
 
+  private EnumSet<AccessDelegationMode> parseAccessDelegationModes(String 
accessDelegationMode) {
+    EnumSet<AccessDelegationMode> delegationModes =
+        AccessDelegationMode.fromProtocolValuesList(accessDelegationMode);
+    if (!delegationModes.isEmpty() && 
!delegationModes.contains(VENDED_CREDENTIALS)) {
+      throw new IllegalArgumentException(
+          "Unsupported access delegation mode: " + accessDelegationMode);
+    }

Review Comment:
   Also I think we shouldn't throw in case of empty, as the callers will do 
something differently for empty `delegationModes`. 
   
https://github.com/polaris-catalog/polaris/blob/main/polaris-service/src/main/java/org/apache/polaris/service/catalog/IcebergCatalogAdapter.java#L197-L197



-- 
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]

Reply via email to