diff options
author | Julien Desprez <jdesprez@google.com> | 2017-08-30 00:22:55 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-08-30 00:22:55 +0000 |
commit | 064dc68f6a8e3dffe7b550a842f214d5d89f9f41 (patch) | |
tree | f7720d7359b00f3143f497975c74015de225f170 /src/com/android/tradefed | |
parent | 9e0501b5a583a0e180d45b5734e58b9ef2926703 (diff) | |
parent | 49b8ba806d6eddb20b3211c6802d588721a15699 (diff) | |
download | tradefederation-064dc68f6a8e3dffe7b550a842f214d5d89f9f41.tar.gz |
Merge "Conserve order of keys in device build map" into oc-dev
am: 49b8ba806d
Change-Id: Iecf24e466e83634587025df25bb64737f6f3f724
Diffstat (limited to 'src/com/android/tradefed')
-rw-r--r-- | src/com/android/tradefed/invoker/InvocationContext.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/com/android/tradefed/invoker/InvocationContext.java b/src/com/android/tradefed/invoker/InvocationContext.java index f8a4be437..0ebe25c31 100644 --- a/src/com/android/tradefed/invoker/InvocationContext.java +++ b/src/com/android/tradefed/invoker/InvocationContext.java @@ -29,7 +29,6 @@ import com.android.tradefed.util.UniqueMultiMap; import java.io.IOException; import java.io.ObjectInputStream; import java.util.ArrayList; -import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -61,7 +60,7 @@ public class InvocationContext implements IInvocationContext { * Creates a {@link BuildInfo} using default attribute values. */ public InvocationContext() { - mAllocatedDeviceAndBuildMap = new HashMap<ITestDevice, IBuildInfo>(); + mAllocatedDeviceAndBuildMap = new LinkedHashMap<ITestDevice, IBuildInfo>(); // Use LinkedHashMap to ensure key ordering by insertion order mNameAndDeviceMap = new LinkedHashMap<String, ITestDevice>(); mNameAndBuildinfoMap = new LinkedHashMap<String, IBuildInfo>(); @@ -298,7 +297,7 @@ public class InvocationContext implements IInvocationContext { // our "pseudo-constructor" in.defaultReadObject(); // now we are a "live" object again, so let's init the transient field - mAllocatedDeviceAndBuildMap = new HashMap<ITestDevice, IBuildInfo>(); + mAllocatedDeviceAndBuildMap = new LinkedHashMap<ITestDevice, IBuildInfo>(); mNameAndDeviceMap = new LinkedHashMap<String, ITestDevice>(); } } |