desruisseaux commented on code in PR #40:
URL: https://github.com/apache/sis/pull/40#discussion_r2792625566
##########
endorsed/src/org.apache.sis.cloud.aws/main/org/apache/sis/cloud/aws/s3/FileService.java:
##########
@@ -308,7 +446,39 @@ public Path getPath(final URI uri) {
if (host == null) host = uri.toString();
throw new
IllegalArgumentException(Resources.format(Resources.Keys.InvalidBucketName_1,
host));
}
- final String path = uri.getPath();
+
+ final ClientFileSystem fs;
+ if (accessKey == null && port == -1) {
+ fs = getDefaultFileSystem();
+ } else if (accessKey == null && port > -1) {
+ fs = getDefaultFileSystem(host, port);
+ } else {
+ // TODO: we may need a way to get password here.
+ ClientFileSystemKey fsKey;
+
+ if (port == -1) {
Review Comment:
We should be consistent about whether we check for exactly value -1 for
meaning "port not set" or any value < 0. Maybe check in `java.net.URI` if they
said something about that.
--
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]