mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-04 04:19:09 +00:00
Java 8: Single Map method can be used
This commit is contained in:
parent
3a5d8ba696
commit
7b2a7847e5
@ -160,12 +160,7 @@ public class DefaultSavedRequest implements SavedRequest {
|
||||
}
|
||||
|
||||
private void addHeader(String name, String value) {
|
||||
List<String> values = headers.get(name);
|
||||
|
||||
if (values == null) {
|
||||
values = new ArrayList<>();
|
||||
headers.put(name, values);
|
||||
}
|
||||
List<String> values = headers.computeIfAbsent(name, k -> new ArrayList<>());
|
||||
|
||||
values.add(value);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user