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


##########
endorsed/src/org.apache.sis.cloud.aws/main/org/apache/sis/cloud/aws/s3/FileService.java:
##########
@@ -237,66 +333,112 @@ final class Creator implements Function<String, 
ClientFileSystem> {
      * Removes the given file system from the cache.
      * This method is invoked after the file system has been closed.
      */
-    final void dispose(String identifier) {
+    final void dispose(ClientFileSystemKey identifier) {
         if (identifier == null) {
-            identifier = DEFAULT_ACCESS_KEY;
+            identifier = new ClientFileSystemKey(DEFAULT_ACCESS_KEY, 
DEFAULT_HOST_KEY, DEFAULT_PORT_KEY, DEFAULT_IS_HTTPS);
         }
         fileSystems.remove(identifier);
     }
 
     /**
-     * Returns the file system associated to the {@link #DEFAULT_ACCESS_KEY}.
+     * Returns the file system associated to the {@link #DEFAULT_ACCESS_KEY}, 
{@link #DEFAULT_HOST_KEY}, {@link #DEFAULT_PORT_KEY} and {@link 
#DEFAULT_IS_HTTPS}.
      *
      * @throws SdkException if the file system cannot be created.
      */
     private ClientFileSystem getDefaultFileSystem() {
-        return fileSystems.computeIfAbsent(DEFAULT_ACCESS_KEY, (key) -> new 
ClientFileSystem(this, S3Client.create()));
+        return fileSystems.computeIfAbsent(new 
ClientFileSystemKey(DEFAULT_ACCESS_KEY, DEFAULT_HOST_KEY, DEFAULT_PORT_KEY, 
DEFAULT_IS_HTTPS), (key) ->
+                new ClientFileSystem(this, S3Client.create(), null));
+    }
+
+    /**
+     * Returns the file system associated to the {@link #DEFAULT_HOST_KEY} and 
{@link #DEFAULT_PORT_KEY}.
+     *
+     * @param accessKey     the access key
+     * @throws SdkException if the file system cannot be created.
+     */
+    private ClientFileSystem getDefaultFileSystem(String accessKey) {
+        return fileSystems.computeIfAbsent(
+                new ClientFileSystemKey(accessKey, DEFAULT_HOST_KEY, 
DEFAULT_PORT_KEY, DEFAULT_IS_HTTPS), (key) -> new ClientFileSystem(this, 
S3Client.create(), key.accessKey));

Review Comment:
   `(key) ->` on the next line, aligned with `new ClientFileSystemKey`.



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