Use Map#forEach instead of Map#entrySet#forEach
See gh-1449
This commit is contained in:
@@ -175,10 +175,11 @@ class DefaultClientRequestBuilder implements ClientRequest.Builder {
|
||||
|
||||
MultiValueMap<String, HttpCookie> requestCookies = request.getCookies();
|
||||
if (!this.cookies.isEmpty()) {
|
||||
this.cookies.forEach((name, values) -> values.forEach(value -> {
|
||||
HttpCookie cookie = new HttpCookie(name, value);
|
||||
requestCookies.add(name, cookie);
|
||||
}));
|
||||
this.cookies.forEach(( name , values) ->
|
||||
values.forEach(value -> {
|
||||
HttpCookie cookie = new HttpCookie(name, value);
|
||||
requestCookies.add(name, cookie);
|
||||
}));
|
||||
}
|
||||
|
||||
return this.inserter.insert(request, new BodyInserter.Context() {
|
||||
|
||||
@@ -224,10 +224,10 @@ class ControllerMethodResolver {
|
||||
Class<?> handlerType = handlerMethod.getBeanType();
|
||||
|
||||
// Global methods first
|
||||
this.initBinderAdviceCache.entrySet().forEach(entry -> {
|
||||
if (entry.getKey().isApplicableToBeanType(handlerType)) {
|
||||
Object bean = entry.getKey().resolveBean();
|
||||
entry.getValue().forEach(method -> result.add(getInitBinderMethod(bean, method)));
|
||||
this.initBinderAdviceCache.forEach((adviceBean, methods) -> {
|
||||
if (adviceBean.isApplicableToBeanType(handlerType)) {
|
||||
Object bean = adviceBean.resolveBean();
|
||||
methods.forEach(method -> result.add(getInitBinderMethod(bean, method)));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -257,10 +257,10 @@ class ControllerMethodResolver {
|
||||
Class<?> handlerType = handlerMethod.getBeanType();
|
||||
|
||||
// Global methods first
|
||||
this.modelAttributeAdviceCache.entrySet().forEach(entry -> {
|
||||
if (entry.getKey().isApplicableToBeanType(handlerType)) {
|
||||
Object bean = entry.getKey().resolveBean();
|
||||
entry.getValue().forEach(method -> result.add(createAttributeMethod(bean, method)));
|
||||
this.modelAttributeAdviceCache.forEach((adviceBean, methods) -> {
|
||||
if (adviceBean.isApplicableToBeanType(handlerType)) {
|
||||
Object bean = adviceBean.resolveBean();
|
||||
methods.forEach(method -> result.add(createAttributeMethod(bean, method)));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public class ReactorNettyWebSocketClient extends WebSocketClientSupport implemen
|
||||
}
|
||||
|
||||
private void setNettyHeaders(HttpHeaders headers, io.netty.handler.codec.http.HttpHeaders nettyHeaders) {
|
||||
headers.keySet().stream().forEach(key -> nettyHeaders.set(key, headers.get(key)));
|
||||
headers.forEach(nettyHeaders::set);
|
||||
}
|
||||
|
||||
private HttpHeaders toHttpHeaders(HttpClientResponse response) {
|
||||
|
||||
Reference in New Issue
Block a user