Polish contribution

See gh-30343
This commit is contained in:
Stephane Nicoll 2023-04-20 15:46:12 +02:00
parent f79d145b4c
commit ea0340f892
2 changed files with 4 additions and 6 deletions

View File

@ -91,9 +91,8 @@ class Netty5HeadersAdapter implements MultiValueMap<String, String> {
@Override
public Map<String, String> toSingleValueMap() {
Map<String, String> singleValueMap = CollectionUtils.newLinkedHashMap(this.headers.size());
this.headers.forEach(entry ->
singleValueMap.putIfAbsent(entry.getKey().toString(), entry.getValue().toString())
);
this.headers.forEach(entry -> singleValueMap.putIfAbsent(
entry.getKey().toString(), entry.getValue().toString()));
return singleValueMap;
}

View File

@ -89,9 +89,8 @@ final class Netty5HeadersAdapter implements MultiValueMap<String, String> {
@Override
public Map<String, String> toSingleValueMap() {
Map<String, String> singleValueMap = CollectionUtils.newLinkedHashMap(this.headers.size());
this.headers.forEach(entry ->
singleValueMap.putIfAbsent(entry.getKey().toString(), entry.getValue().toString())
);
this.headers.forEach(entry -> singleValueMap.putIfAbsent(
entry.getKey().toString(), entry.getValue().toString()));
return singleValueMap;
}