desruisseaux commented on code in PR #40:
URL: https://github.com/apache/sis/pull/40#discussion_r2792612750


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

Review Comment:
   Can be rewritten as:
   
   ```java
   if (accessKey == null) {
       if (port < 0) {
           fs = getDefaultFileSystem();
       } else {
           fs = getDefaultFileSystem(host, port);
       }
   } else {
   ```
   



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