From 270f2c3b4efca4960d943d0dc9160a89f921ba8f Mon Sep 17 00:00:00 2001 From: Tibor Kiss Date: Thu, 10 Mar 2011 12:13:18 +0100 Subject: [PATCH] Issue 430: fixed part ordering problem at completing the multipart upload. --- .../strategy/internal/SequentialMultipartUploadStrategy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java index 25d338ebe6..98d0718005 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java @@ -22,6 +22,7 @@ package org.jclouds.aws.s3.blobstore.strategy.internal; import static com.google.common.base.Preconditions.checkNotNull; import java.util.Map; +import java.util.SortedMap; import javax.annotation.Resource; import javax.inject.Inject; @@ -164,7 +165,7 @@ public class SequentialMultipartUploadStrategy implements MultipartUploadStrateg AWSS3Client client = (AWSS3Client) ablobstore.getContext().getProviderSpecificContext().getApi(); String uploadId = client.initiateMultipartUpload(container, ObjectMetadataBuilder.create().key(key).build()); // TODO // md5 - Map etags = Maps.newHashMap(); + SortedMap etags = Maps.newTreeMap(); int part; while ((part = getNextPart()) <= getParts()) { String eTag = prepareUploadPart(client, container, key, uploadId, part,