Skip to content

Commit

Permalink
Initialize Map with correct size in RequestPredicates
Browse files Browse the repository at this point in the history
  • Loading branch information
kilink committed Feb 6, 2024
1 parent 8ff1021 commit 828e3ac
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.MimeTypeUtils;
import org.springframework.util.MultiValueMap;
import org.springframework.validation.BindException;
Expand Down Expand Up @@ -324,7 +325,7 @@ private static <K, V> Map<K, V> mergeMaps(Map<K, V> left, Map<K, V> right) {
return left;
}
else {
Map<K, V> result = new LinkedHashMap<>(left.size() + right.size());
Map<K, V> result = CollectionUtils.newLinkedHashMap(left.size() + right.size());
result.putAll(left);
result.putAll(right);
return result;
Expand Down

0 comments on commit 828e3ac

Please sign in to comment.