Skip to content

Commit 6f1b583

Browse files
committed
Polishing
1 parent 507d4ba commit 6f1b583

File tree

8 files changed

+41
-40
lines changed

8 files changed

+41
-40
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ else if (arg instanceof TypedStringValue) {
272272

273273

274274
/**
275-
* Reflective InvocationHandler for lazy access to the current target object.
275+
* Reflective {@link InvocationHandler} for lazy access to the current target object.
276276
*/
277277
@SuppressWarnings("serial")
278278
private static class ObjectFactoryDelegatingInvocationHandler implements InvocationHandler, Serializable {

spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -287,7 +287,7 @@ else if (ambiguousConstructors != null && !mbd.isLenientConstructorResolution())
287287
}
288288

289289
private Object instantiate(
290-
String beanName, RootBeanDefinition mbd, Constructor constructorToUse, Object[] argsToUse) {
290+
String beanName, RootBeanDefinition mbd, Constructor<?> constructorToUse, Object[] argsToUse) {
291291

292292
try {
293293
InstantiationStrategy strategy = this.beanFactory.getInstantiationStrategy();

spring-beans/src/test/java/org/springframework/beans/factory/support/AutowireUtilsTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,6 +27,8 @@
2727
import static org.junit.Assert.*;
2828

2929
/**
30+
* Unit tests for {@link AutowireUtils}.
31+
*
3032
* @author Juergen Hoeller
3133
* @author Sam Brannen
3234
*/
@@ -36,7 +38,7 @@ public class AutowireUtilsTests {
3638
public void genericMethodReturnTypes() {
3739
Method notParameterized = ReflectionUtils.findMethod(MyTypeWithMethods.class, "notParameterized");
3840
assertEquals(String.class,
39-
AutowireUtils.resolveReturnTypeForFactoryMethod(notParameterized, new Object[]{}, getClass().getClassLoader()));
41+
AutowireUtils.resolveReturnTypeForFactoryMethod(notParameterized, new Object[0], getClass().getClassLoader()));
4042

4143
Method notParameterizedWithArguments = ReflectionUtils.findMethod(MyTypeWithMethods.class, "notParameterizedWithArguments", Integer.class, Boolean.class);
4244
assertEquals(String.class,

spring-web/src/main/java/org/springframework/http/server/reactive/AbstractServerHttpRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,11 +43,11 @@
4343
*/
4444
public abstract class AbstractServerHttpRequest implements ServerHttpRequest {
4545

46-
protected final Log logger = HttpLogging.forLogName(getClass());
47-
4846
private static final Pattern QUERY_PATTERN = Pattern.compile("([^&=]+)(=?)([^&]+)?");
4947

5048

49+
protected final Log logger = HttpLogging.forLogName(getClass());
50+
5151
private final URI uri;
5252

5353
private final RequestPath path;

spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityDecoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ private void copyCharactersTillPotentialReference() {
9595
int skipUntilIndex = (this.nextPotentialReferencePosition != -1 ?
9696
this.nextPotentialReferencePosition : this.originalMessage.length());
9797
if (skipUntilIndex - this.currentPosition > 3) {
98-
this.decodedMessage.append(this.originalMessage.substring(this.currentPosition, skipUntilIndex));
98+
this.decodedMessage.append(this.originalMessage, this.currentPosition, skipUntilIndex);
9999
this.currentPosition = skipUntilIndex;
100100
}
101101
else {

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -418,7 +418,7 @@ protected ResponseEntity<Object> handleNoHandlerFoundException(
418418
}
419419

420420
/**
421-
* Customize the response for NoHandlerFoundException.
421+
* Customize the response for AsyncRequestTimeoutException.
422422
* <p>This method delegates to {@link #handleExceptionInternal}.
423423
* @param ex the exception
424424
* @param headers the headers to be written to the response
@@ -446,7 +446,7 @@ protected ResponseEntity<Object> handleAsyncRequestTimeoutException(
446446
}
447447

448448
/**
449-
* A single place to customize the response body of all Exception types.
449+
* A single place to customize the response body of all exception types.
450450
* <p>The default implementation sets the {@link WebUtils#ERROR_EXCEPTION_ATTRIBUTE}
451451
* request attribute and creates a {@link ResponseEntity} from the given
452452
* body, headers, and status.

src/docs/asciidoc/core/core-aop.adoc

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ implementation detail actually means.
202202

203203
@AspectJ refers to a style of declaring aspects as regular Java classes annotated with
204204
annotations. The @AspectJ style was introduced by the
205-
http://www.eclipse.org/aspectj[AspectJ project] as part of the AspectJ 5 release. Spring
205+
https://www.eclipse.org/aspectj[AspectJ project] as part of the AspectJ 5 release. Spring
206206
interprets the same annotations as AspectJ 5, using a library supplied by AspectJ
207207
for pointcut parsing and matching. The AOP runtime is still pure Spring AOP, though, and
208208
there is no dependency on the AspectJ compiler or weaver.
@@ -352,9 +352,9 @@ matches the execution of any method named `transfer`:
352352

353353
The pointcut expression that forms the value of the `@Pointcut` annotation is a regular
354354
AspectJ 5 pointcut expression. For a full discussion of AspectJ's pointcut language, see
355-
the http://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
355+
the https://www.eclipse.org/aspectj/doc/released/progguide/index.html[AspectJ
356356
Programming Guide] (and, for extensions, the
357-
http://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
357+
https://www.eclipse.org/aspectj/doc/released/adk15notebook/index.html[AspectJ 5
358358
Developer's Notebook]) or one of the books on AspectJ (such as _Eclipse AspectJ_, by Colyer
359359
et. al., or _AspectJ in Action_, by Ramnivas Laddad).
360360

@@ -462,9 +462,8 @@ it is natural and straightforward to identify specific beans by name.
462462
[[aop-pointcuts-combining]]
463463
==== Combining Pointcut Expressions
464464

465-
You can combine pointcut expressions can be combined by using `&&,` `||` and `!`. You can also
466-
refer to pointcut expressions by name. The following example shows three pointcut
467-
expressions:
465+
You can combine pointcut expressions by using `&&,` `||` and `!`. You can also refer to
466+
pointcut expressions by name. The following example shows three pointcut expressions:
468467

469468
====
470469
[source,java,indent=0]
@@ -620,7 +619,7 @@ method that takes no parameters, whereas `(..)` matches any number (zero or more
620619
The `({asterisk})` pattern matches a method that takes one parameter of any type.
621620
`(*,String)` matches a method that takes two parameters. The first can be of any type, while the
622621
second must be a `String`. Consult the
623-
http://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html[Language
622+
https://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html[Language
624623
Semantics] section of the AspectJ Programming Guide for more information.
625624

626625
The following examples show some common pointcut expressions:
@@ -1317,7 +1316,7 @@ following strategy to determine parameter names:
13171316
====
13181317
+
13191318
If the first parameter is of the `JoinPoint`, `ProceedingJoinPoint`, or
1320-
`JoinPoint.StaticPart` type, you ca leave out the name of the parameter from the value
1319+
`JoinPoint.StaticPart` type, you can leave out the name of the parameter from the value
13211320
of the `argNames` attribute. For example, if you modify the preceding advice to receive
13221321
the join point object, the `argNames` attribute need not include it:
13231322
+
@@ -2514,7 +2513,7 @@ simple method executions (for example, field get or set join points and so on).
25142513
When you use AspectJ, you have the choice of the AspectJ language syntax (also known as
25152514
the "`code style`") or the @AspectJ annotation style. Clearly, if you do not use Java
25162515
5+, the choice has been made for you: Use the code style. If aspects play a large
2517-
role in your design, and you are able to use the http://www.eclipse.org/ajdt/[AspectJ
2516+
role in your design, and you are able to use the https://www.eclipse.org/ajdt/[AspectJ
25182517
Development Tools (AJDT)] plugin for Eclipse, the AspectJ language syntax is the
25192518
preferred option. It is cleaner and simpler because the language was purposefully
25202519
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
29462945
"`initialization`" refers to newly instantiated objects (for example, objects instantiated
29472946
with the `new` operator) as well as to `Serializable` objects that are undergoing
29482947
deserialization (for example, through
2949-
http://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html[readResolve()]).
2948+
https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html[readResolve()]).
29502949

29512950
[NOTE]
29522951
=====
@@ -2969,14 +2968,14 @@ available for use in the body of the constructors, you need to define this on th
29692968
29702969
You can find more information about the language semantics of the various pointcut
29712970
types in AspectJ
2972-
http://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html[in this
2973-
appendix] of the http://www.eclipse.org/aspectj/doc/next/progguide/index.html[AspectJ
2971+
https://www.eclipse.org/aspectj/doc/next/progguide/semantics-joinPoints.html[in this
2972+
appendix] of the https://www.eclipse.org/aspectj/doc/next/progguide/index.html[AspectJ
29742973
Programming Guide].
29752974
=====
29762975

29772976
For this to work, the annotated types must be woven with the AspectJ weaver. You can
29782977
either use a build-time Ant or Maven task to do this (see, for example, the
2979-
http://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html[AspectJ Development
2978+
https://www.eclipse.org/aspectj/doc/released/devguide/antTasks.html[AspectJ Development
29802979
Environment Guide]) or load-time weaving (see <<aop-aj-ltw>>). The
29812980
`AnnotationBeanConfigurerAspect` itself needs to be configured by Spring (in order to obtain
29822981
a reference to the bean factory that is to be used to configure new objects). If you
@@ -3202,7 +3201,7 @@ The focus of this section is on configuring and using LTW in the specific contex
32023201
Spring Framework. This section is not a general introduction to LTW. For full details on
32033202
the specifics of LTW and configuring LTW with only AspectJ (with Spring not being
32043203
involved at all), see the
3205-
http://www.eclipse.org/aspectj/doc/released/devguide/ltw.html[LTW section of the AspectJ
3204+
https://www.eclipse.org/aspectj/doc/released/devguide/ltw.html[LTW section of the AspectJ
32063205
Development Environment Guide].
32073206

32083207
The value that the Spring Framework brings to AspectJ LTW is in enabling much
@@ -3549,20 +3548,20 @@ The following table summarizes various `LoadTimeWeaver` implementations:
35493548
|===
35503549
| Runtime Environment| `LoadTimeWeaver` implementation
35513550

3552-
| Running in http://tomcat.apache.org/[Apache Tomcat]
3551+
| Running in https://tomcat.apache.org/[Apache Tomcat]
35533552
| `TomcatLoadTimeWeaver`
35543553

3555-
| Running in http://glassfish.dev.java.net/[GlassFish] (limited to EAR deployments)
3554+
| Running in https://glassfish.dev.java.net/[GlassFish] (limited to EAR deployments)
35563555
| `GlassFishLoadTimeWeaver`
35573556

3558-
| Running in Red Hat's http://www.jboss.org/jbossas/[JBoss AS] or http://www.wildfly.org/[WildFly]
3557+
| Running in Red Hat's https://www.jboss.org/jbossas/[JBoss AS] or https://www.wildfly.org/[WildFly]
35593558
| `JBossLoadTimeWeaver`
35603559

3561-
| Running in IBM's http://www-01.ibm.com/software/webservers/appserv/was/[WebSphere]
3560+
| Running in IBM's https://www-01.ibm.com/software/webservers/appserv/was/[WebSphere]
35623561
| `WebSphereLoadTimeWeaver`
35633562

35643563
| Running in Oracle's
3565-
http://www.oracle.com/technetwork/middleware/weblogic/overview/index-085209.html[WebLogic]
3564+
https://www.oracle.com/technetwork/middleware/weblogic/overview/index-085209.html[WebLogic]
35663565
| `WebLogicLoadTimeWeaver`
35673566

35683567
| JVM started with Spring `InstrumentationSavingAgent`
@@ -3718,7 +3717,7 @@ Spring Boot applications, you typically control the entire JVM setup in any case
37183717
[[aop-resources]]
37193718
== Further Resources
37203719

3721-
More information on AspectJ can be found on the http://www.eclipse.org/aspectj[AspectJ website].
3720+
More information on AspectJ can be found on the https://www.eclipse.org/aspectj[AspectJ website].
37223721

37233722
_Eclipse AspectJ_ by Adrian Colyer et. al. (Addison-Wesley, 2005) provides a
37243723
comprehensive introduction and reference for the AspectJ language.

src/docs/asciidoc/web/webmvc.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ redirect is needed. The rest of the view name is the redirect URL.
711711
The net effect is the same as if the controller had returned a `RedirectView`, but now
712712
the controller itself can operate in terms of logical view names. A logical view
713713
name (such as `redirect:/myapp/some/resource`) redirects relative to the current
714-
Servlet context, while a name such as `redirect:http://myhost.com/some/arbitrary/path`
714+
Servlet context, while a name such as `redirect:https://myhost.com/some/arbitrary/path`
715715
redirects to an absolute URL.
716716

717717
Note that, if a controller method is annotated with the `@ResponseStatus`, the annotation
@@ -1297,7 +1297,7 @@ directly to the response body versus view resolution and rendering with an HTML
12971297
[[mvc-ann-requestmapping-proxying]]
12981298
==== AOP Proxies
12991299

1300-
In some cases, you many need to decorate a controller with an AOP proxy at runtime.
1300+
In some cases, you may need to decorate a controller with an AOP proxy at runtime.
13011301
One example is if you choose to have `@Transactional` annotations directly on the
13021302
controller. When this is the case, for controllers specifically, we recommend
13031303
using class-based proxying. This is typically the default choice with controllers.
@@ -1449,7 +1449,7 @@ sorted last. Also, prefix patterns (such as `/public/{asterisk}{asterisk}`) are
14491449
specific than other pattern that do not have double wildcards.
14501450

14511451
For the full details, see {api-spring-framework}/util/AntPathMatcher.AntPatternComparator.html[`AntPatternComparator`]
1452-
in {api-spring-framework}/util/AntPathMatcher.html[`AntPathMatcher`] and also keep mind that
1452+
in {api-spring-framework}/util/AntPathMatcher.html[`AntPathMatcher`] and also keep in mind that
14531453
you can customize the {api-spring-framework}/util/PathMatcher.html[`PathMatcher`] implementation.
14541454
See <<mvc-config-path-matching>> in the configuration section.
14551455

@@ -1508,7 +1508,7 @@ Many common path extensions are whitelisted by default. Applications with custom
15081508
negotiation to avoid having a `Content-Disposition` header added for those extensions.
15091509
See <<mvc-config-content-negotiation>>.
15101510

1511-
See http://pivotal.io/security/cve-2015-5211[CVE-2015-5211] for additional
1511+
See https://pivotal.io/security/cve-2015-5211[CVE-2015-5211] for additional
15121512
recommendations related to RFD.
15131513

15141514

@@ -1965,9 +1965,9 @@ See <<core.adoc#format, Spring Field Formatting>>.
19651965
==== Matrix Variables
19661966
[.small]#<<web-reactive.adoc#webflux-ann-matrix-variables, Same as in Spring WebFlux>>#
19671967

1968-
http://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
1968+
https://tools.ietf.org/html/rfc3986#section-3.3[RFC 3986] discusses name-value pairs in
19691969
path segments. In Spring MVC, we refer to those as "`matrix variables`" based on an
1970-
http://www.w3.org/DesignIssues/MatrixURIs.html["`old post`"] by Tim Berners-Lee, but they
1970+
https://www.w3.org/DesignIssues/MatrixURIs.html["`old post`"] by Tim Berners-Lee, but they
19711971
can be also be referred to as URI path parameters.
19721972

19731973
Matrix variables can appear in any path segment, with each variable separated by a semicolon and
@@ -3853,7 +3853,7 @@ suitable under load. If you plan to stream with a reactive type, you should use
38533853

38543854
The Servlet API does not provide any notification when a remote client goes away.
38553855
Therefore, while streaming to the response, whether through <<mvc-ann-async-sse, SseEmitter>>
3856-
or <<mvc-ann-async-reactive-types, reactive types>, it is important to send data periodically,
3856+
or <<mvc-ann-async-reactive-types, reactive types>>, it is important to send data periodically,
38573857
since the write fails if the client has disconnected. The send could take the form of an
38583858
empty (comment-only) SSE event or any other data that the other side would have to interpret
38593859
as a heartbeat and ignore.

0 commit comments

Comments
 (0)