This is an automated email from the ASF dual-hosted git repository.
gaul pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/jclouds.git
The following commit(s) were added to refs/heads/2.2.x by this push:
new e66bffa Hash the content for fs MPU ETag if no xattr.
e66bffa is described below
commit e66bffa52168fa1c005b84477d9a4754c7a57074
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())