Skip to content

Commit

Permalink
Retain response order for Set responses #823
Browse files Browse the repository at this point in the history
Lettuce now retains the response order for set results such as smembers. Previously, we used a plain HashSet that did not honor insertion order. Now we're using LinkedHashSet that retains the insertion order for unique elements.
  • Loading branch information
mp911de committed Jul 27, 2018
1 parent 63a28d0 commit 4d4c19b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ static <V> Set<V> newSet(int capacity) {
return Collections.emptySet();
}

return new HashSet<>(capacity, 1);
return new LinkedHashSet<>(capacity, 1);
}
}

0 comments on commit 4d4c19b

Please sign in to comment.