quantranhong1999 commented on code in PR #2960:
URL: https://github.com/apache/james-project/pull/2960#discussion_r3050111306


##########
server/blob/blob-memory/src/main/java/org/apache/james/blob/memory/MemoryBlobStoreDAO.java:
##########
@@ -62,12 +62,18 @@ public Publisher<InputStream> readReactive(BucketName 
bucketName, BlobId blobId)
             .map(ByteArrayInputStream::new);
     }
 
-    @Override
     public Mono<byte[]> readBytes(BucketName bucketName, BlobId blobId) {
         return Mono.fromCallable(() -> blobs.get(bucketName, blobId))
             .switchIfEmpty(Mono.error(() -> new 
ObjectNotFoundException(String.format("blob '%s' not found in bucket '%s'", 
blobId.asString(), bucketName.asString()))));
     }
 
+    @Override
+    public Publisher<BytesBlob> readBytesBlob(BucketName bucketName, BlobId 
blobId) {
+        return Mono.fromCallable(() -> blobs.get(bucketName, blobId))
+            .switchIfEmpty(Mono.error(() -> new 
ObjectNotFoundException(String.format("blob '%s' not found in bucket '%s'", 
blobId.asString(), bucketName.asString()))))
+            .map(BytesBlob::of);

Review Comment:
   I believe memory does record the metadata now.



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