diff --git a/build.gradle b/build.gradle index 436f7b0507..1dd0d5fbe0 100644 --- a/build.gradle +++ b/build.gradle @@ -171,7 +171,7 @@ configure(allprojects) { project -> // JSR-305 only used for non-required meta-annotations compileOnly("com.google.code.findbugs:jsr305:3.0.2") testCompileOnly("com.google.code.findbugs:jsr305:3.0.2") - checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.5") + checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.7") } ext.javadocLinks = [ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java index 65c5d0662b..5d25f93fb8 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcCall.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -314,9 +314,8 @@ public abstract class AbstractJdbcCall { this.callMetaDataContext.initializeMetaData(dataSource); // Iterate over the declared RowMappers and register the corresponding SqlParameter - this.declaredRowMappers.forEach((key, value) -> { - this.declaredParameters.add(this.callMetaDataContext.createReturnResultSetParameter(key, value)); - }); + this.declaredRowMappers.forEach((key, value) -> + this.declaredParameters.add(this.callMetaDataContext.createReturnResultSetParameter(key, value))); this.callMetaDataContext.processParameters(this.declaredParameters); this.callString = this.callMetaDataContext.createCallString(); diff --git a/spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpResponse.java index 99d9a45fb8..60d94517da 100644 --- a/spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -66,7 +66,7 @@ class JettyClientHttpResponse implements ClientHttpResponse { MultiValueMap result = new LinkedMultiValueMap<>(); List cookieHeader = getHeaders().get(HttpHeaders.SET_COOKIE); if (cookieHeader != null) { - cookieHeader.forEach(header -> { + cookieHeader.forEach(header -> HttpCookie.parse(header) .forEach(cookie -> result.add(cookie.getName(), ResponseCookie.from(cookie.getName(), cookie.getValue()) @@ -75,8 +75,7 @@ class JettyClientHttpResponse implements ClientHttpResponse { .maxAge(cookie.getMaxAge()) .secure(cookie.getSecure()) .httpOnly(cookie.isHttpOnly()) - .build())); - }); + .build()))); } return CollectionUtils.unmodifiableMultiValueMap(result); } diff --git a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java index 5d12fb91f1..3a447bd89b 100644 --- a/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/reactive/ReactorClientHttpResponse.java @@ -66,13 +66,12 @@ class ReactorClientHttpResponse implements ClientHttpResponse { throw new IllegalStateException("The client response body can only be consumed once."); } }) - .doOnCancel(() -> { + .doOnCancel(() -> // https://github.com/reactor/reactor-netty/issues/503 // FluxReceive rejects multiple subscribers, but not after a cancel(). // Subsequent subscribers after cancel() will not be rejected, but will hang instead. // So we need to intercept and reject them in that case. - this.rejectSubscribers.set(true); - }) + this.rejectSubscribers.set(true)) .map(byteBuf -> { byteBuf.retain(); return this.bufferFactory.wrap(byteBuf); diff --git a/spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageReader.java b/spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageReader.java index 664dcc531d..ffecd7c518 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageReader.java +++ b/spring-web/src/main/java/org/springframework/http/codec/multipart/MultipartHttpMessageReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2019 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. @@ -89,17 +89,15 @@ public class MultipartHttpMessageReader extends LoggingCodecSupport public Mono> readMono(ResolvableType elementType, ReactiveHttpInputMessage inputMessage, Map hints) { - Map allHints = Hints.merge(hints, Hints.SUPPRESS_LOGGING_HINT, true); return this.partReader.read(elementType, inputMessage, allHints) .collectMultimap(Part::name) - .doOnNext(map -> { + .doOnNext(map -> LogFormatUtils.traceDebug(logger, traceOn -> Hints.getLogPrefix(hints) + "Parsed " + (isEnableLoggingRequestDetails() ? LogFormatUtils.formatValue(map, !traceOn) : - "parts " + map.keySet() + " (content masked)")); - }) + "parts " + map.keySet() + " (content masked)"))) .map(this::toMultiValueMap); }