Skip to content

Commit

Permalink
Predictable encoding conflict resolution
Browse files Browse the repository at this point in the history
Close #1170

Respect insertion order when iterating multiple encodings by
using an ArrayListMultimap to store them.
  • Loading branch information
quanticc authored and asereda-gs committed May 3, 2020
1 parent 0c2d47e commit 66166f3
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -16,7 +16,7 @@
package org.immutables.value.processor.encode;

import com.google.common.base.Optional;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import java.util.ArrayList;
import java.util.LinkedHashSet;
Expand All @@ -35,7 +35,7 @@

public final class Instantiator {
private final Type.Factory typeFactory;
private final Multimap<Type, TemplateAnchor> anchors = HashMultimap.create();
private final Multimap<Type, TemplateAnchor> anchors = ArrayListMultimap.create();

Instantiator(Type.Factory typeFactory, Set<EncodingInfo> encodings) {
this.typeFactory = typeFactory;
Expand Down

0 comments on commit 66166f3

Please sign in to comment.