jerryshao commented on code in PR #11294:
URL: https://github.com/apache/gravitino/pull/11294#discussion_r3340817134


##########
common/src/main/java/org/apache/gravitino/credential/CredentialPropertyUtils.java:
##########
@@ -82,24 +94,25 @@ public class CredentialPropertyUtils {
    * @return a map of Iceberg properties derived from the credential
    */
   public static Map<String, String> toIcebergProperties(Credential credential) 
{
-    if (credential instanceof S3TokenCredential
-        || credential instanceof S3SecretKeyCredential
-        || credential instanceof OSSTokenCredential
-        || credential instanceof OSSSecretKeyCredential
-        || credential instanceof AzureAccountKeyCredential
-        || credential instanceof AwsIrsaCredential) {
-      return transformProperties(credential.credentialInfo(), 
icebergCredentialPropertyMap);
-    }
-
-    if (credential instanceof GCSTokenCredential) {
+    if (credential instanceof S3TokenCredential || credential instanceof 
AwsIrsaCredential) {
+      Map<String, String> icebergProperties =
+          transformProperties(credential.credentialInfo(), 
icebergCredentialPropertyMap);

Review Comment:
   Why can't we extract these two lines out of if...else loop? They are 
duplicated for all the if...else branches.



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