Commit Graph

20982 Commits

Author SHA1 Message Date
Sam Brannen
e190851aee Merge branch '5.2.x' 2020-06-13 14:53:35 +02:00
Sam Brannen
94d7462891 Ensure spring-core JAR is reproducible
Prior to this commit, a change to Javadoc in any class in spring-core
would result in ALL tests in the entire test suite being re-run via the
Gradle build.

Thanks to a tip from @melix, this commit aims to ensure that the
spring-core JAR is "reproducible".
2020-06-13 14:53:06 +02:00
Sam Brannen
3f7e86eadd Update Javadoc for Assert regarding Guava Preconditions 2020-06-13 14:53:06 +02:00
Sam Brannen
50a0094a47 Ensure spring-core JAR is reproducible
Prior to this commit, a change to Javadoc in any class in spring-core
would result in ALL tests in the entire test suite being re-run via the
Gradle build.

Thanks to a tip from @melix, this commit ensures that the spring-core
JAR is "reproducible".
2020-06-13 14:36:27 +02:00
Sam Brannen
30385dae8d Upgrade JDK 15 CI image to JDK 15 build 26 2020-06-12 09:56:46 +02:00
Sam Brannen
d9969d1e4d Update Javadoc for Assert regarding Guava Preconditions 2020-06-12 09:49:47 +02:00
Roland Weisleder
f9cca5d9d6 Add tests for Assert.noNullElements(Collection, ...)
Commit 4000b244ff introduced new variants for noNullElements in
org.springframework.util.Assert.

This commit adds the corresponding tests to AssertTests.

Closes gh-25239
2020-06-12 09:37:25 +02:00
Juergen Hoeller
b66e718560 Upgrade to Rome 1.13.1 2020-06-12 00:58:44 +02:00
Juergen Hoeller
188722a358 Merge branch '5.2.x' 2020-06-12 00:52:00 +02:00
Juergen Hoeller
5e24085061 Upgrade to Apache Johnzon 1.2.7 and OpenPDF 1.3.19 2020-06-12 00:47:31 +02:00
Juergen Hoeller
b24a337146 Polishing 2020-06-12 00:39:58 +02:00
Juergen Hoeller
1279b3b822 Merge branch '5.2.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java
#	spring-context-support/src/main/java/org/springframework/cache/jcache/config/AbstractJCacheConfiguration.java
2020-06-11 23:53:27 +02:00
Juergen Hoeller
9138a04a0a Polishing 2020-06-11 23:45:23 +02:00
Juergen Hoeller
e46ccd74b1 Consistent abstract declaration of "Abstract" base classes
Closes gh-25240
2020-06-11 23:43:41 +02:00
Sam Brannen
bc4945d677 Ensure non-null condition comes 1st in ternary operator
See gh-25232
2020-06-11 15:11:48 +02:00
GardenLee
e866fac8e7 Wrap ternary operator within parentheses as outlined in Code Style
Closes gh-25232
2020-06-11 15:11:48 +02:00
Juergen Hoeller
663f2e8afd Merge branch '5.2.x' 2020-06-10 22:53:06 +02:00
Juergen Hoeller
ae1ed9d458 Document exception handling limitations in TaskDecorator implementations
Closes gh-25231
2020-06-10 22:52:01 +02:00
Juergen Hoeller
8697026987 Support for custom cache registration in CaffeineCacheManager
Closes gh-25230
2020-06-10 22:50:11 +02:00
Sam Brannen
b0e07cc7e3 Delete dead code in spring-webmvc 2020-06-10 18:35:03 +02:00
Sam Brannen
335ca75ec2 Polish contribution
See gh-25078
2020-06-10 18:25:31 +02:00
liym@home
8fb7399a0c Upgrade to Dom4j 2.1.3 and Jaxen 1.2.0
Closes gh-25078
2020-06-10 16:38:43 +02:00
Arjen Poutsma
202799e6fe Rethrow XMLStreamExceptions as DecodingExceptions
Prior to this commit, Jaxb2XmlDecoder and XmlEventDecoder threw
XMLStreamExceptions instead of DecodingExceptions (as the Decoder
contract defines).

This commit resolves this issue.

Closes: gh-24778
2020-06-10 15:56:45 +02:00
GardenLee
eb3be3ad88 Refactor method name dispatching to switch statements in AutowireUtils
Closes gh-25199
2020-06-09 23:46:29 +02:00
Sam Brannen
b9e52a8089 Delete dead code in MockServerHttpRequest 2020-06-09 17:38:34 +02:00
Sam Brannen
905483be30 Polish Javadoc for @PropertySource 2020-06-09 16:39:58 +02:00
Rossen Stoyanchev
33181daeac Merge branch '5.2.x' 2020-06-09 11:57:40 +01:00
Rossen Stoyanchev
1d0fe1223d Fix checkstyle violation 2020-06-09 11:47:05 +01:00
Rossen Stoyanchev
3cc7efc841 Merge branch '5.2.x' 2020-06-09 09:02:52 +01:00
Rossen Stoyanchev
b48ddef4c6 Upgrade to RSocket 1.0.1 2020-06-09 08:59:55 +01:00
Stephane Nicoll
e0d712946c Merge branch '5.2.x' 2020-06-09 09:56:49 +02:00
Spring Buildmaster
d0a9e359aa Next Development Version 2020-06-09 06:51:55 +00:00
Rossen Stoyanchev
1984cfe9d7 Merge branch '5.2.x' 2020-06-08 21:20:44 +01:00
Rossen Stoyanchev
a2d516d526 Replace "whitelist" with alternative words 2020-06-08 21:19:28 +01:00
Juergen Hoeller
21b1f30660 Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-06-08 20:26:14 +02:00
Juergen Hoeller
4c29bbb77f Upgrade to Reactor Dysprosium-SR8
Closes gh-25210
2020-06-08 20:23:37 +02:00
Juergen Hoeller
d2cd4c50f4 Upgrade to Tomcat 9.0.36 2020-06-08 19:38:23 +02:00
Juergen Hoeller
c777468056 Polishing 2020-06-08 19:37:58 +02:00
Juergen Hoeller
9c1c787ee9 Polishing 2020-06-08 19:27:38 +02:00
Sam Brannen
edbc54fe78 Merge branch '5.2.x' 2020-06-08 19:17:01 +02:00
Sam Brannen
721fd20708 Document advice precedence in reference manual
This commit documents the precedence for advice declared within the
same @Aspect class or within the same <aop:aspect> element.

See gh-25186
2020-06-08 19:06:46 +02:00
Sam Brannen
0b760c15ea Polish AOP chapter in reference manual 2020-06-08 19:06:46 +02:00
Rossen Stoyanchev
150fe96a98 Merge branch '5.2.x' 2020-06-08 17:44:42 +01:00
Rossen Stoyanchev
9e1121fd8d Document behavior on reactive tx cancellation
Closes gh-25091
2020-06-08 17:43:52 +01:00
Arjen Poutsma
8b59b6a7f4 Merge branch '5.2.x' 2020-06-08 15:43:49 +02:00
Arjen Poutsma
0ccf5e19aa Undo MockServerRequest deprecation
Setting path variables (and making sure they are available in a
HandlerFunction) is more convenient with MockServerRequest than
having to set attributes in MockServerWebExchange.

This commit removes MockServerRequest's deprecation.

Closes gh-25087
2020-06-08 15:40:09 +02:00
Sam Brannen
0bfcabebf3 Merge branch '5.2.x' 2020-06-08 14:21:50 +02:00
Sam Brannen
0998bd49ef Implement reliable advice invocation order within an @Aspect
The AspectJPrecedenceComparator was designed to mimic the precedence
order enforced by the AspectJ compiler with regard to multiple 'after'
methods defined within the same aspect whose pointcuts match the same
joinpoint. Specifically, if an aspect declares multiple @After,
@AfterReturning, or @AfterThrowing advice methods whose pointcuts match
the same joinpoint, such 'after' advice methods should be invoked in
the reverse order in which they are declared in the source code.

When the AspectJPrecedenceComparator was introduced in Spring Framework
2.0, it achieved its goal of mimicking the AspectJ compiler since the
JDK at that time (i.e., Java 5) ensured that an invocation of
Class#geDeclaredMethods() returned an array of methods that matched the
order of declaration in the source code. However, Java 7 removed this
guarantee. Consequently, in Java 7 or higher,
AspectJPrecedenceComparator no longer works as it is documented or as
it was designed when sorting advice methods in a single @Aspect class.
Note, however, that AspectJPrecedenceComparator continues to work as
documented and designed when sorting advice configured via the
<aop:aspect> XML namespace element.

PR gh-24673 highlights a use case where AspectJPrecedenceComparator
fails to assign the highest precedence to an @After advice method
declared last in the source code. Note that an @After advice method
with a precedence higher than @AfterReturning and @AfterThrowing advice
methods in the same aspect will effectively be invoked last due to the
try-finally implementation in AspectJAfterAdvice.invoke() which invokes
proceed() in the try-block and invokeAdviceMethod() in the
finally-block.

Since Spring cannot reliably determine the source code declaration
order of annotated advice methods without using ASM to analyze the byte
code, this commit introduces reliable invocation order for advice
methods declared within a single @Aspect. Specifically, the
getAdvisors(...) method in ReflectiveAspectJAdvisorFactory now hard
codes the declarationOrderInAspect to `0` instead of using the index of
the current advice method. This is necessary since the index no longer
has any correlation to the method declaration order in the source code.
The result is that all advice methods discovered via reflection will
now be sorted only according to the precedence rules defined in the
ReflectiveAspectJAdvisorFactory.METHOD_COMPARATOR. Specifically, advice
methods within a single @Aspect will be sorted in the following order
(with @After advice methods effectively invoked after @AfterReturning
and @AfterThrowing advice methods): @Around, @Before, @After,
@AfterReturning, @AfterThrowing.

The modified assertions in AspectJAutoProxyAdviceOrderIntegrationTests
demonstrate the concrete effects of this change.

Closes gh-25186
2020-06-08 14:18:28 +02:00
Sam Brannen
d6525cfb97 Polishing 2020-06-08 14:17:39 +02:00
Juergen Hoeller
a34f1e3759 Merge branch '5.2.x'
# Conflicts:
#	build.gradle
#	spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java
#	spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java
#	spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java
2020-06-06 18:52:51 +02:00