mirror of https://github.com/apache/jclouds.git
changed to Linked Lists so that unit tests are predictable across JDKs
git-svn-id: http://jclouds.googlecode.com/svn/trunk@2234 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
7f3e658953
commit
99ba4498ec
|
@ -37,7 +37,7 @@ import org.jclouds.blobstore.functions.CalculateSize;
|
|||
import org.jclouds.blobstore.functions.GenerateMD5;
|
||||
import org.jclouds.blobstore.functions.GenerateMD5Result;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.LinkedHashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
/**
|
||||
|
@ -54,7 +54,7 @@ public class AtmosObjectImpl implements AtmosObject, Comparable<AtmosObject> {
|
|||
private final SystemMetadata systemMetadata;
|
||||
private Object data;
|
||||
|
||||
private Multimap<String, String> allHeaders = HashMultimap.create();
|
||||
private Multimap<String, String> allHeaders = LinkedHashMultimap.create();
|
||||
|
||||
public AtmosObjectImpl(GenerateMD5Result generateMD5Result, GenerateMD5 generateMD5,
|
||||
CalculateSize calculateSize, MutableContentMetadata contentMetadata) {
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.jclouds.blobstore.functions.CalculateSize;
|
|||
import org.jclouds.blobstore.functions.GenerateMD5;
|
||||
import org.jclouds.blobstore.functions.GenerateMD5Result;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.LinkedHashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
/**
|
||||
|
@ -51,7 +51,7 @@ public class AzureBlobImpl implements AzureBlob, Comparable<AzureBlob> {
|
|||
private final CalculateSize calculateSize;
|
||||
private final MutableBlobProperties properties;
|
||||
private Object data;
|
||||
private Multimap<String, String> allHeaders = HashMultimap.create();
|
||||
private Multimap<String, String> allHeaders = LinkedHashMultimap.create();
|
||||
private Long contentLength;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -277,7 +277,7 @@ public class AzureBlobClientLiveTest {
|
|||
assertEquals(metadata.getMetadata().get("metadata"), "metadata-value");
|
||||
|
||||
// // Test POST to update object's metadata
|
||||
// Multimap<String, String> userMetadata = HashMultimap.create();
|
||||
// Multimap<String, String> userMetadata = LinkedHashMultimap.create();
|
||||
// userMetadata.put("New-Metadata-1", "value-1");
|
||||
// userMetadata.put("New-Metadata-2", "value-2");
|
||||
// assertTrue(connection.setBlobProperties(privateContainer, object.getProperties().getName(),
|
||||
|
|
|
@ -38,7 +38,7 @@ import org.jclouds.blobstore.functions.CalculateSize;
|
|||
import org.jclouds.blobstore.functions.GenerateMD5;
|
||||
import org.jclouds.blobstore.functions.GenerateMD5Result;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.LinkedHashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ public class BlobImpl implements Blob, Comparable<Blob> {
|
|||
private final CalculateSize calculateSize;
|
||||
private final MutableBlobMetadata metadata;
|
||||
private Object data;
|
||||
private Multimap<String, String> allHeaders = HashMultimap.create();
|
||||
private Multimap<String, String> allHeaders = LinkedHashMultimap.create();
|
||||
private Long contentLength;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.jclouds.blobstore.functions.CalculateSize;
|
|||
import org.jclouds.mezeo.pcs2.domain.MutableFileInfo;
|
||||
import org.jclouds.mezeo.pcs2.domain.PCSFile;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.LinkedHashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
/**
|
||||
|
@ -44,7 +44,7 @@ public class PCSFileImpl implements PCSFile, Comparable<PCSFile> {
|
|||
private final CalculateSize calculateSize;
|
||||
private final MutableFileInfo metadata;
|
||||
private Object data;
|
||||
private Multimap<String, String> allHeaders = HashMultimap.create();
|
||||
private Multimap<String, String> allHeaders = LinkedHashMultimap.create();
|
||||
private Long contentLength;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -49,7 +49,6 @@ public class BindMetadataToQueryParams implements Binder {
|
|||
for (Entry<String, String> entry : userMetadata.entrySet()) {
|
||||
metadata.add(String.format("%s:%s", entry.getKey().toLowerCase(), entry.getValue()));
|
||||
}
|
||||
((GeneratedHttpRequest) request).replaceQueryParam("metadata", metadata.toArray());
|
||||
((GeneratedHttpRequest) request).addQueryParam("metadata", metadata.toArray(new String[] {}));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ public class AddSessionTokenToRequest implements HttpRequestFilter {
|
|||
public void filter(HttpRequest request) throws HttpException {
|
||||
checkArgument(checkNotNull(request, "input") instanceof GeneratedHttpRequest<?>,
|
||||
"this decorator is only valid for GeneratedHttpRequests!");
|
||||
((GeneratedHttpRequest<?>) request).replaceQueryParam(SDNQueryParams.SESSIONTOKEN,
|
||||
((GeneratedHttpRequest<?>) request).addQueryParam(SDNQueryParams.SESSIONTOKEN,
|
||||
getSessionToken());
|
||||
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class BindMetadataToQueryParamsTest {
|
|||
BindMetadataToQueryParams binder = new BindMetadataToQueryParams();
|
||||
|
||||
GeneratedHttpRequest<?> request = createMock(GeneratedHttpRequest.class);
|
||||
request.replaceQueryParam("metadata", "imagename:foo", "serverid:2");
|
||||
request.addQueryParam("metadata", "imagename:foo", "serverid:2");
|
||||
replay(request);
|
||||
binder.bindToRequest(request, ImmutableMap.of("imageName", "foo", "serverId", "2"));
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.jclouds.blobstore.functions.GenerateMD5Result;
|
|||
import org.jclouds.rackspace.cloudfiles.domain.CFObject;
|
||||
import org.jclouds.rackspace.cloudfiles.domain.MutableObjectInfoWithMetadata;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.LinkedHashMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
/**
|
||||
|
@ -51,7 +51,7 @@ public class CFObjectImpl implements CFObject, Comparable<CFObject> {
|
|||
private final CalculateSize calculateSize;
|
||||
private final MutableObjectInfoWithMetadata info;
|
||||
private Object data;
|
||||
private Multimap<String, String> allHeaders = HashMultimap.create();
|
||||
private Multimap<String, String> allHeaders = LinkedHashMultimap.create();
|
||||
private Long contentLength;
|
||||
|
||||
@Inject
|
||||
|
|
Loading…
Reference in New Issue