tengqm commented on code in PR #5801:
URL: https://github.com/apache/gravitino/pull/5801#discussion_r1881407741


##########
bundles/aws-bundle/src/main/java/org/apache/gravitino/s3/credential/S3TokenProvider.java:
##########
@@ -104,6 +104,10 @@ private StsClient createStsClient(S3CredentialConfig 
s3CredentialConfig) {
     if (StringUtils.isNotBlank(region)) {
       builder.region(Region.of(region));
     }
+    String stsEndpoint = s3CredentialConfig.stsEndpoint();
+    if (StringUtils.isNotBlank(stsEndpoint)) {
+      builder.endpointOverride(URI.create(stsEndpoint));

Review Comment:
   Okay. If there is no known way to validate the URI string, can we confirm 
URI.create() will reject an empty string? The check here is incomplete, that 
worries me.
   Either we do a thorough validation, or we delegate that to URI.create(), 
both are acceptable. I'm concerned at this kind of partial validation.
   If the decision is to delegate the checking to URI.create(), we need to get 
prepared
   for the exception, somewhere along the call chain.



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