You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2026/10/19 14:55:09 UTC

(james-project) 02/09: JAMES-4231 Fix S3 range error mapping

This is an automated email from the ASF dual-hosted git repository.

Arsnael pushed a commit to branch feature/s3-object-compaction
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit ec6543be9ca39020bf8f6f0bfe07e54f5466580e
Author: Hesanda Liyanage <13...@users.noreply.github.com>
AuthorDate: Sat Oct 10 17:05:53 2026 +0530

    JAMES-4231 Fix S3 range error mapping
---
 .../java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java b/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
index b8f5c3c0c6..0f7a21ab8d 100644
--- a/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
+++ b/server/blob/blob-s3/src/main/java/org/apache/james/blob/objectstorage/aws/S3BlobStoreDAO.java
@@ -254,9 +254,9 @@ public class S3BlobStoreDAO implements BlobStoreDAO {
         return getObjectRangeBytes(resolvedBucketName, blobId, rangeHeader)
             .onErrorMap(NoSuchBucketException.class, e -> new ObjectNotFoundException("Bucket not found " + resolvedBucketName.asString(), e))
             .onErrorMap(NoSuchKeyException.class, e -> new ObjectNotFoundException("Blob not found " + blobId.asString() + " in bucket " + resolvedBucketName.asString(), e))
-            .onErrorMap(this::isRangeNotSatisfiable, e -> new IllegalArgumentException("Range not satisfiable: " + rangeHeader, e))
+            .onErrorMap(S3BlobStoreDAO::isRangeNotSatisfiable, e -> new IllegalArgumentException("Range not satisfiable: " + rangeHeader, e))
             .publishOn(Schedulers.parallel())
-            .map(responseBytes -> BytesBlob.of(responseBytes.asByteArrayUnsafe(), metadataForRange(responseBytes.response())))
+            .<Blob>map(responseBytes -> BytesBlob.of(responseBytes.asByteArrayUnsafe(), metadataForRange(responseBytes.response())))
             .onErrorMap(e -> e.getCause() instanceof OutOfMemoryError, Throwable::getCause);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org