chibenwa commented on code in PR #2960:
URL: https://github.com/apache/james-project/pull/2960#discussion_r2916464569
##########
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:
> 🤔 shouldn't the in memory be adapted to actually store the metadata ? the
MemoryBlobStoreDao will always loose all metadata.
Short answer: later. I don't like spending time writing non consensual code
that do not get integrated.
--
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]