We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a5d8ba commit 7b2a784Copy full SHA for 7b2a784
web/src/main/java/org/springframework/security/web/savedrequest/DefaultSavedRequest.java
@@ -160,12 +160,7 @@ private void addCookie(Cookie cookie) {
160
}
161
162
private void addHeader(String name, String value) {
163
- List<String> values = headers.get(name);
164
-
165
- if (values == null) {
166
- values = new ArrayList<>();
167
- headers.put(name, values);
168
- }
+ List<String> values = headers.computeIfAbsent(name, k -> new ArrayList<>());
169
170
values.add(value);
171
0 commit comments