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


##########
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:
   > Sorry but I still think this specific change is breaking backwards 
compatibility of the name resolver API. 
   
   Indeed it does !
   
   But IMO we do not care at all as this is solely a S3 implementation detail.
   
   > The UploadRepository also uses the dao directly and users can have built 
custom componants that also use the DAO which we don't control.
   
   Off a custom bucket which is stable
   
   > and users can have built custom componants that also use the DAO which we 
don't control.
   
    -> If they use BlobStore.defaultBucket() then they would retain the same 
behaviour by adapting their code to use `BucketName.DEFAULT`
    -> If they use a custom bucket then it is stable
    
    > If these users were relying on the previous behavior their 
implementations will break
    
    I really do not think so.



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