From 0bbaa304801f63455d45081dc08d9c7efd73a7f1 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 23 Jun 2020 11:47:47 +0200 Subject: [PATCH] Polishing --- .../AbstractInterfaceDrivenDependencyInjectionAspect.aj | 3 ++- .../factory/aspectj/AnnotationBeanConfigurerAspect.aj | 8 ++++++-- .../springframework/web/context/request/WebRequest.java | 8 ++++---- src/docs/asciidoc/web/webmvc.adoc | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj index f48e0d9252e5..6e049a58a045 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-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. @@ -67,6 +67,7 @@ import java.io.Serializable; * @since 2.5.2 */ public abstract aspect AbstractInterfaceDrivenDependencyInjectionAspect extends AbstractDependencyInjectionAspect { + /** * Select initialization join point as object construction */ diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj index 98599fb2e4e2..923e459b4438 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-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. @@ -47,22 +47,26 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport; public aspect AnnotationBeanConfigurerAspect extends AbstractInterfaceDrivenDependencyInjectionAspect implements BeanFactoryAware, InitializingBean, DisposableBean { - private BeanConfigurerSupport beanConfigurerSupport = new BeanConfigurerSupport(); + private final BeanConfigurerSupport beanConfigurerSupport = new BeanConfigurerSupport(); + @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanConfigurerSupport.setBeanWiringInfoResolver(new AnnotationBeanWiringInfoResolver()); this.beanConfigurerSupport.setBeanFactory(beanFactory); } + @Override public void afterPropertiesSet() { this.beanConfigurerSupport.afterPropertiesSet(); } + @Override public void configureBean(Object bean) { this.beanConfigurerSupport.configureBean(bean); } + @Override public void destroy() { this.beanConfigurerSupport.destroy(); } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java index 7e6bb2946369..6985a3e564bf 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-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. @@ -140,7 +140,7 @@ public interface WebRequest extends RequestAttributes { * and HTTP status when applicable. *

Typical usage: *

-	 * public String myHandleMethod(WebRequest webRequest, Model model) {
+	 * public String myHandleMethod(WebRequest request, Model model) {
 	 *   long lastModified = // application-specific calculation
 	 *   if (request.checkNotModified(lastModified)) {
 	 *     // shortcut exit - no further processing necessary
@@ -177,7 +177,7 @@ public interface WebRequest extends RequestAttributes {
 	 * and HTTP status when applicable.
 	 * 

Typical usage: *

-	 * public String myHandleMethod(WebRequest webRequest, Model model) {
+	 * public String myHandleMethod(WebRequest request, Model model) {
 	 *   String eTag = // application-specific calculation
 	 *   if (request.checkNotModified(eTag)) {
 	 *     // shortcut exit - no further processing necessary
@@ -208,7 +208,7 @@ public interface WebRequest extends RequestAttributes {
 	 * response headers, and HTTP status when applicable.
 	 * 

Typical usage: *

-	 * public String myHandleMethod(WebRequest webRequest, Model model) {
+	 * public String myHandleMethod(WebRequest request, Model model) {
 	 *   String eTag = // application-specific calculation
 	 *   long lastModified = // application-specific calculation
 	 *   if (request.checkNotModified(eTag, lastModified)) {
diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc
index 506177fcb6ec..2a4aeb14e7d5 100644
--- a/src/docs/asciidoc/web/webmvc.adoc
+++ b/src/docs/asciidoc/web/webmvc.adoc
@@ -4034,7 +4034,7 @@ as the following example shows:
 [subs="verbatim,quotes"]
 ----
 	@RequestMapping
-	public String myHandleMethod(WebRequest webRequest, Model model) {
+	public String myHandleMethod(WebRequest request, Model model) {
 
 		long eTag = ... <1>