Replace a HashMap with a LinkedHashMap for more deterministic behavior
Helps some ResourceProcessorBusyBox (used by Bazel `android_library` rule) operations consistently produce the same output given the same input.
RELNOTES: None.
@@ -33,7 +33,6 @@ import com.google.devtools.build.android.proto.SerializeFormat.DataValueXml.XmlT
import java.io.IOException;
import java.io.OutputStream;
import java.util.AbstractMap.SimpleEntry;
-import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
@@ -164,7 +163,7 @@ public class StyleableXmlResourceValue implements XmlResourceValue {
}
public static XmlResourceValue from(Value proto, ReferenceResolver packageResolver) {
- Map<FullyQualifiedName, Boolean> attributes = new HashMap<>();
+ Map<FullyQualifiedName, Boolean> attributes = new LinkedHashMap<>();
Styleable styleable = proto.getCompoundValue().getStyleable();
for (Styleable.Entry entry : styleable.getEntryList()) {
