chibenwa commented on code in PR #2904:
URL: https://github.com/apache/james-project/pull/2904#discussion_r2671221229


##########
server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/BucketNameResolver.java:
##########
@@ -87,17 +87,15 @@ private BucketNameResolver(Optional<BucketName> namespace, 
Optional<String> pref
     BucketName resolve(BucketName bucketName) {
         Preconditions.checkNotNull(bucketName);
 
-        if (isNameSpace(bucketName)) {
-            return bucketName;
-        }
-        return prefix
-            .map(bucketPrefix -> BucketName.of(bucketPrefix + 
bucketName.asString()))
-            .orElse(bucketName);
+        return namespace.filter(any -> BucketName.DEFAULT.equals(bucketName))

Review Comment:
   Yes but it's coupled with the changes: you no longer call `resolve("foo")` 
but `resolve("default")` which is translated into `foo`.
   
   This is this behavioural change, in a technical class, that makes the entire 
refactoring viable.



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