From b34778d220db02e5fe271220910b058ee0994771 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 26 Sep 2020 15:02:15 +0200 Subject: [PATCH] Polishing --- .../http/converter/FormHttpMessageConverter.java | 3 ++- .../annotation/ServletRequestMethodArgumentResolver.java | 2 +- src/docs/asciidoc/web/webflux.adoc | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java index 3f00ba91dd..4ec8f08a9e 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java @@ -232,7 +232,8 @@ public class FormHttpMessageConverter implements HttpMessageConverter> getPartConverters() { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java index 0d1c0355a5..43560bdc6f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java @@ -89,7 +89,7 @@ public class ServletRequestMethodArgumentResolver implements HandlerMethodArgume MultipartRequest.class.isAssignableFrom(paramType) || HttpSession.class.isAssignableFrom(paramType) || (pushBuilder != null && pushBuilder.isAssignableFrom(paramType)) || - (Principal.class.isAssignableFrom(paramType) && parameter.getParameterAnnotations().length == 0) || + (Principal.class.isAssignableFrom(paramType) && !parameter.hasParameterAnnotations()) || InputStream.class.isAssignableFrom(paramType) || Reader.class.isAssignableFrom(paramType) || HttpMethod.class == paramType || diff --git a/src/docs/asciidoc/web/webflux.adoc b/src/docs/asciidoc/web/webflux.adoc index c6f1cfeb26..d4c7eb9ac6 100644 --- a/src/docs/asciidoc/web/webflux.adoc +++ b/src/docs/asciidoc/web/webflux.adoc @@ -971,8 +971,8 @@ The following example shows how to do so for client-side requests: Logging libraries such as SLF4J and Log4J 2 provide asynchronous loggers that avoid blocking. While those have their own drawbacks such as potentially dropping messages -that could not be queued for logging, they are the best available option currently -or use in a reactive, non-blocking application. +that could not be queued for logging, they are the best available options currently +for use in a reactive, non-blocking application.