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

gaul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jclouds.git


The following commit(s) were added to refs/heads/master by this push:
     new 8d0e9dc  Hash the content for fs MPU ETag if no xattr.
8d0e9dc is described below

commit 8d0e9dc962dff614d56ca7428bbdca5462679c96
Author: Timur Alperovich <[email protected]>
AuthorDate: Wed Mar 4 12:14:21 2020 -0800

    Hash the content for fs MPU ETag if no xattr.
    
    If there is no extended attribute support in the file system, the blobs
    will not have their associated ETags available. In that case, the file
    system blob store should rehash the content while producing the combined
    blob and return the expected S3-style ETag.
---
 .../src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java 
b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java
index 9c521be..6877c77 100644
--- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java
+++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java
@@ -840,7 +840,9 @@ public final class LocalBlobStore implements BlobStore {
          Blob blobPart = getBlob(mpu.containerName(), MULTIPART_PREFIX + 
mpu.id() + "-" + mpu.blobName() + "-" + part.partNumber());
          contentLength += 
blobPart.getMetadata().getContentMetadata().getContentLength();
          blobs.add(blobPart);
-         
md5Hasher.putBytes(BaseEncoding.base16().lowerCase().decode(blobPart.getMetadata().getETag()));
+         if (blobPart.getMetadata().getETag() != null) {
+            
md5Hasher.putBytes(BaseEncoding.base16().lowerCase().decode(blobPart.getMetadata().getETag()));
+         }
       }
       String mpuETag = new StringBuilder("\"")
          .append(md5Hasher.hash())

Reply via email to