diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java index 310e2158ed..9dc470d457 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java @@ -272,7 +272,7 @@ abstract class AutowireUtils { /** - * Reflective InvocationHandler for lazy access to the current target object. + * Reflective {@link InvocationHandler} for lazy access to the current target object. */ @SuppressWarnings("serial") private static class ObjectFactoryDelegatingInvocationHandler implements InvocationHandler, Serializable { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java index 4c7247d34f..6f0d40813e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.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. @@ -287,7 +287,7 @@ class ConstructorResolver { } private Object instantiate( - String beanName, RootBeanDefinition mbd, Constructor constructorToUse, Object[] argsToUse) { + String beanName, RootBeanDefinition mbd, Constructor> constructorToUse, Object[] argsToUse) { try { InstantiationStrategy strategy = this.beanFactory.getInstantiationStrategy(); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/AutowireUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/AutowireUtilsTests.java index 1dc7338142..48cf786160 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/AutowireUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/AutowireUtilsTests.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. @@ -27,6 +27,8 @@ import org.springframework.util.ReflectionUtils; import static org.junit.Assert.*; /** + * Unit tests for {@link AutowireUtils}. + * * @author Juergen Hoeller * @author Sam Brannen */ @@ -36,7 +38,7 @@ public class AutowireUtilsTests { public void genericMethodReturnTypes() { Method notParameterized = ReflectionUtils.findMethod(MyTypeWithMethods.class, "notParameterized"); assertEquals(String.class, - AutowireUtils.resolveReturnTypeForFactoryMethod(notParameterized, new Object[]{}, getClass().getClassLoader())); + AutowireUtils.resolveReturnTypeForFactoryMethod(notParameterized, new Object[0], getClass().getClassLoader())); Method notParameterizedWithArguments = ReflectionUtils.findMethod(MyTypeWithMethods.class, "notParameterizedWithArguments", Integer.class, Boolean.class); assertEquals(String.class, diff --git a/spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpRequest.java b/spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpRequest.java index 32780bb49e..84c2e9597a 100644 --- a/spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpRequest.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. @@ -43,11 +43,11 @@ import org.springframework.util.StringUtils; */ public abstract class AbstractServerHttpRequest implements ServerHttpRequest { - protected final Log logger = HttpLogging.forLogName(getClass()); - private static final Pattern QUERY_PATTERN = Pattern.compile("([^&=]+)(=?)([^&]+)?"); + protected final Log logger = HttpLogging.forLogName(getClass()); + private final URI uri; private final RequestPath path; diff --git a/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityDecoder.java b/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityDecoder.java index 54bca57f3d..2277edfff3 100644 --- a/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityDecoder.java +++ b/spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityDecoder.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. @@ -95,7 +95,7 @@ class HtmlCharacterEntityDecoder { int skipUntilIndex = (this.nextPotentialReferencePosition != -1 ? this.nextPotentialReferencePosition : this.originalMessage.length()); if (skipUntilIndex - this.currentPosition > 3) { - this.decodedMessage.append(this.originalMessage.substring(this.currentPosition, skipUntilIndex)); + this.decodedMessage.append(this.originalMessage, this.currentPosition, skipUntilIndex); this.currentPosition = skipUntilIndex; } else { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java index ff05c364d0..40e269194c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.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. @@ -418,7 +418,7 @@ public abstract class ResponseEntityExceptionHandler { } /** - * Customize the response for NoHandlerFoundException. + * Customize the response for AsyncRequestTimeoutException. *
This method delegates to {@link #handleExceptionInternal}. * @param ex the exception * @param headers the headers to be written to the response @@ -446,7 +446,7 @@ public abstract class ResponseEntityExceptionHandler { } /** - * A single place to customize the response body of all Exception types. + * A single place to customize the response body of all exception types. *
The default implementation sets the {@link WebUtils#ERROR_EXCEPTION_ATTRIBUTE}
* request attribute and creates a {@link ResponseEntity} from the given
* body, headers, and status.
diff --git a/src/docs/asciidoc/core/core-aop.adoc b/src/docs/asciidoc/core/core-aop.adoc
index af738a18be..0498ff3b04 100644
--- a/src/docs/asciidoc/core/core-aop.adoc
+++ b/src/docs/asciidoc/core/core-aop.adoc
@@ -202,7 +202,7 @@ implementation detail actually means.
@AspectJ refers to a style of declaring aspects as regular Java classes annotated with
annotations. The @AspectJ style was introduced by the
-http://www.eclipse.org/aspectj[AspectJ project] as part of the AspectJ 5 release. Spring
+https://www.eclipse.org/aspectj[AspectJ project] as part of the AspectJ 5 release. Spring
interprets the same annotations as AspectJ 5, using a library supplied by AspectJ
for pointcut parsing and matching. The AOP runtime is still pure Spring AOP, though, and
there is no dependency on the AspectJ compiler or weaver.
@@ -352,9 +352,9 @@ matches the execution of any method named `transfer`:
The pointcut expression that forms the value of the `@Pointcut` annotation is a regular
AspectJ 5 pointcut expression. For a full discussion of AspectJ's pointcut language, see
-the http://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
+the https://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
Programming Guide] (and, for extensions, the
-http://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
+https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
Developer's Notebook]) or one of the books on AspectJ (such as _Eclipse AspectJ_, by Colyer
et. al., or _AspectJ in Action_, by Ramnivas Laddad).
@@ -462,9 +462,8 @@ it is natural and straightforward to identify specific beans by name.
[[aop-pointcuts-combining]]
==== Combining Pointcut Expressions
-You can combine pointcut expressions can be combined by using `&&,` `||` and `!`. You can also
-refer to pointcut expressions by name. The following example shows three pointcut
-expressions:
+You can combine pointcut expressions by using `&&,` `||` and `!`. You can also refer to
+pointcut expressions by name. The following example shows three pointcut expressions:
====
[source,java,indent=0]
@@ -620,7 +619,7 @@ method that takes no parameters, whereas `(..)` matches any number (zero or more
The `({asterisk})` pattern matches a method that takes one parameter of any type.
`(*,String)` matches a method that takes two parameters. The first can be of any type, while the
second must be a `String`. Consult the
-http://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html[Language
+https://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html[Language
Semantics] section of the AspectJ Programming Guide for more information.
The following examples show some common pointcut expressions:
@@ -1317,7 +1316,7 @@ following strategy to determine parameter names:
====
+
If the first parameter is of the `JoinPoint`, `ProceedingJoinPoint`, or
-`JoinPoint.StaticPart` type, you ca leave out the name of the parameter from the value
+`JoinPoint.StaticPart` type, you can leave out the name of the parameter from the value
of the `argNames` attribute. For example, if you modify the preceding advice to receive
the join point object, the `argNames` attribute need not include it:
+
@@ -2514,7 +2513,7 @@ simple method executions (for example, field get or set join points and so on).
When you use AspectJ, you have the choice of the AspectJ language syntax (also known as
the "`code style`") or the @AspectJ annotation style. Clearly, if you do not use Java
5+, the choice has been made for you: Use the code style. If aspects play a large
-role in your design, and you are able to use the http://www.eclipse.org/ajdt/[AspectJ
+role in your design, and you are able to use the https://www.eclipse.org/ajdt/[AspectJ
Development Tools (AJDT)] plugin for Eclipse, the AspectJ language syntax is the
preferred option. It is cleaner and simpler because the language was purposefully
designed for writing aspects. If you do not use Eclipse or have only a few aspects
@@ -2946,7 +2945,7 @@ using Spring in accordance with the properties of the annotation`". In this cont
"`initialization`" refers to newly instantiated objects (for example, objects instantiated
with the `new` operator) as well as to `Serializable` objects that are undergoing
deserialization (for example, through
-http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html[readResolve()]).
+https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html[readResolve()]).
[NOTE]
=====
@@ -2969,14 +2968,14 @@ available for use in the body of the constructors, you need to define this on th
You can find more information about the language semantics of the various pointcut
types in AspectJ
-http://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html[in this
-appendix] of the http://www.eclipse.org/aspectj/doc/next/progguide/index.html[AspectJ
+https://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html[in this
+appendix] of the https://www.eclipse.org/aspectj/doc/next/progguide/index.html[AspectJ
Programming Guide].
=====
For this to work, the annotated types must be woven with the AspectJ weaver. You can
either use a build-time Ant or Maven task to do this (see, for example, the
-http://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html[AspectJ Development
+https://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html[AspectJ Development
Environment Guide]) or load-time weaving (see <