rdblue commented on a change in pull request #3656:
URL: https://github.com/apache/iceberg/pull/3656#discussion_r761565848



##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3URI.java
##########
@@ -58,14 +54,14 @@
 
     this.location = location;
     String [] schemeSplit = location.split(SCHEME_DELIM, -1);
-    ValidationException.check(schemeSplit.length == 2, "Invalid S3 URI: %s", 
location);
-
-    String scheme = schemeSplit[0];
-    ValidationException.check(VALID_SCHEMES.contains(scheme.toLowerCase()), 
"Invalid scheme: %s", scheme);
+    ValidationException.check(schemeSplit.length == 2,
+        "Cannot determine S3 URI scheme: %s", location);
 
     String [] authoritySplit = schemeSplit[1].split(PATH_DELIM, 2);
-    ValidationException.check(authoritySplit.length == 2, "Invalid S3 URI: 
%s", location);
-    ValidationException.check(!authoritySplit[1].trim().isEmpty(), "Invalid S3 
key: %s", location);
+    ValidationException.check(authoritySplit.length == 2,
+        "Cannot determine bucket in S3 URI path: %s", location);

Review comment:
       The bucket isn't in the URI path element, it is in the authority. Maybe 
just "Cannot determine bucket in S3 URI" instead?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to