From 85d029f7c36b7f5a5156f19f35907f0b15ed3894 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 1 Nov 2022 23:11:03 +0900 Subject: [PATCH] Polishing Closes gh-29410 --- .../java/org/springframework/aot/hint/ResourceBundleHint.java | 2 +- .../core/annotation/AnnotatedElementUtils.java | 4 ++-- .../method/annotation/ExceptionHandlerExceptionResolver.java | 2 +- .../mvc/method/annotation/RequestMappingHandlerAdapter.java | 2 +- src/docs/asciidoc/web/webflux.adoc | 4 ++-- src/docs/asciidoc/web/webmvc.adoc | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/aot/hint/ResourceBundleHint.java b/spring-core/src/main/java/org/springframework/aot/hint/ResourceBundleHint.java index 5ead9ea4693..ac780dbb248 100644 --- a/spring-core/src/main/java/org/springframework/aot/hint/ResourceBundleHint.java +++ b/spring-core/src/main/java/org/springframework/aot/hint/ResourceBundleHint.java @@ -100,7 +100,7 @@ public final class ResourceBundleHint implements ConditionalHint { } /** - * Use the the {@code baseName} of the resource bundle. + * Use the {@code baseName} of the resource bundle. * @return {@code this}, to facilitate method chaining */ public Builder baseName(String baseName) { diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java index f4ca5f31dea..500feec26eb 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotatedElementUtils.java @@ -780,7 +780,7 @@ public abstract class AnnotatedElementUtils { if (containerType == null) { // Invoke RepeatableContainers.of() in order to adhere to the contract of // getMergedRepeatableAnnotations() which states that an IllegalArgumentException - // will be thrown if the the container cannot be resolved. + // will be thrown if the container cannot be resolved. // // In any case, we use standardRepeatables() in order to support repeatable // annotations on other types of repeatable annotations (i.e., nested repeatable @@ -807,7 +807,7 @@ public abstract class AnnotatedElementUtils { if (containerType == null) { // Invoke RepeatableContainers.of() in order to adhere to the contract of // findMergedRepeatableAnnotations() which states that an IllegalArgumentException - // will be thrown if the the container cannot be resolved. + // will be thrown if the container cannot be resolved. // // In any case, we use standardRepeatables() in order to support repeatable // annotations on other types of repeatable annotations (i.e., nested repeatable diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java index 1fb481f4209..d7c2767fc25 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolver.java @@ -88,7 +88,7 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce @Nullable private HandlerMethodReturnValueHandlerComposite returnValueHandlers; - private List> messageConverters = new ArrayList<>(); + private final List> messageConverters = new ArrayList<>(); private ContentNegotiationManager contentNegotiationManager = new ContentNegotiationManager(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java index d784cab7d1a..74f02955c8e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java @@ -150,7 +150,7 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter private ContentNegotiationManager contentNegotiationManager = new ContentNegotiationManager(); - private List> messageConverters = new ArrayList<>(); + private final List> messageConverters = new ArrayList<>(); private final List requestResponseBodyAdvice = new ArrayList<>(); diff --git a/src/docs/asciidoc/web/webflux.adoc b/src/docs/asciidoc/web/webflux.adoc index 62e5e9da8ad..423a283d483 100644 --- a/src/docs/asciidoc/web/webflux.adoc +++ b/src/docs/asciidoc/web/webflux.adoc @@ -3652,9 +3652,9 @@ from an existing `ProblemDetail`. This could be done centrally, e.g. from an -[[webflux-ann-rest-exceptions-i8n]] +[[webflux-ann-rest-exceptions-i18n]] === Internationalization -[.small]#<># +[.small]#<># It is a common requirement to internationalize error response details, and good practice to customize the problem details for Spring WebFlux exceptions. This is supported as follows: diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index c74c33b6c9c..69a43691991 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -4948,9 +4948,9 @@ from an existing `ProblemDetail`. This could be done centrally, e.g. from an -[[mvc-ann-rest-exceptions-i8n]] +[[mvc-ann-rest-exceptions-i18n]] === Internationalization -[.small]#<># +[.small]#<># It is a common requirement to internationalize error response details, and good practice to customize the problem details for Spring MVC exceptions. This is supported as follows: