Use lazy lambda instead of explicit argument

See gh-21986
This commit is contained in:
dreis2211
2020-06-16 19:50:03 +02:00
committed by Stephane Nicoll
parent ab51f3a0a4
commit 855d596c2a
3 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -318,7 +318,7 @@ class HttpExchangeTracerTests {
@Override
protected void postProcessRequestHeaders(Map<String, List<String>> headers) {
headers.remove("to-remove");
headers.putIfAbsent("to-add", Collections.singletonList("42"));
headers.computeIfAbsent("to-add", (key) -> Collections.singletonList("42"));
}
}