Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix indexing bug in constructor
fix ValueFactory.newMap(Entry<Value, Value>...pairs), which is currently iterating by 2 when it should be iterating through each passed in pair.
  • Loading branch information
Minh-Ng authored Jun 23, 2020
commit b266f14e2dd97172fa5040ab4a7f43a88ff393ea
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public static ImmutableMapValue emptyMap()
public static MapValue newMap(Map.Entry<? extends Value, ? extends Value>... pairs)
{
Value[] kvs = new Value[pairs.length * 2];
for (int i = 0; i < pairs.length; i += 2) {
for (int i = 0; i < pairs.length; ++i) {
kvs[i * 2] = pairs[i].getKey();
kvs[i * 2 + 1] = pairs[i].getValue();
}
Expand Down