mirror of https://github.com/apache/jclouds.git
The metadata needs to be ordered for this implementation.
This commit is contained in:
parent
0843c36dd2
commit
00f844b1d8
|
@ -19,7 +19,7 @@ package org.jclouds.rackspace.cloudloadbalancers.v1.domain;
|
|||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.ForwardingMap;
|
||||
import static com.google.common.collect.Maps.newHashMap;
|
||||
import static com.google.common.collect.Maps.newLinkedHashMap;
|
||||
import static com.google.common.collect.Sets.newHashSet;
|
||||
|
||||
/**
|
||||
|
@ -30,8 +30,8 @@ import static com.google.common.collect.Sets.newHashSet;
|
|||
* @author Everett Toews
|
||||
*/
|
||||
public class Metadata extends ForwardingMap<String, String> {
|
||||
private final Map<String, String> metadata = newHashMap();
|
||||
private final Map<String, Integer> keyToId = newHashMap();
|
||||
private final Map<String, String> metadata = newLinkedHashMap(); // Implementing class must be sorted.
|
||||
private final Map<String, Integer> keyToId = newLinkedHashMap();
|
||||
|
||||
public Metadata(Metadata metadata) {
|
||||
super();
|
||||
|
|
|
@ -219,9 +219,9 @@ public class LoadBalancerApiExpectTest extends BaseCloudLoadBalancerApiExpectTes
|
|||
|
||||
private Metadata getExpectedMetadata() {
|
||||
Metadata metadata = new Metadata();
|
||||
metadata.put("os", "ubuntu");
|
||||
metadata.put("color", "red");
|
||||
metadata.put("label", "web-load-balancer");
|
||||
metadata.put("os", "ubuntu");
|
||||
|
||||
return metadata;
|
||||
}
|
||||
|
|
|
@ -214,9 +214,9 @@ public class NodeApiExpectTest extends BaseCloudLoadBalancerApiExpectTest<CloudL
|
|||
|
||||
private Metadata getExpectedMetadata() {
|
||||
Metadata metadata = new Metadata();
|
||||
metadata.put("os", "ubuntu");
|
||||
metadata.put("color", "red");
|
||||
metadata.put("label", "web-load-balancer");
|
||||
metadata.put("os", "ubuntu");
|
||||
|
||||
return metadata;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue