nastra commented on code in PR #13212:
URL: https://github.com/apache/iceberg/pull/13212#discussion_r2126887816


##########
gcp/src/main/java/org/apache/iceberg/gcp/auth/GoogleAuthManager.java:
##########
@@ -69,10 +72,13 @@ private void initialize(Map<String, String> properties) {
       return;
     }
 
-    String credentialsPath = 
properties.get(GCPProperties.GCP_CREDENTIALS_PATH_PROPERTY);
-    String scopesString =
-        properties.getOrDefault(GCPProperties.GCP_SCOPES_PROPERTY, 
DEFAULT_SCOPES);
-    List<String> scopes = ImmutableList.copyOf(scopesString.split(","));
+    String credentialsPath = properties.get(GCP_CREDENTIALS_PATH_PROPERTY);
+    String scopesString = properties.getOrDefault(GCP_SCOPES_PROPERTY, 
DEFAULT_SCOPES);
+    List<String> scopes =
+        Strings.isNullOrEmpty(scopesString)
+            ? ImmutableList.of()
+            : ImmutableList.copyOf(
+                
Splitter.on(',').trimResults().omitEmptyStrings().splitToList(scopesString));

Review Comment:
   nit: you might want to store the splitter in a private static final



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to