Commit Graph

21624 Commits

Author SHA1 Message Date
Sam Brannen
e25e690ad4 Assert preconditions for MergedAnnotations.from() factory methods
Prior to this commit, if null values were supplied for the
RepeatableContainers or AnnotationFilter arguments to `from()` factory
methods in MergedAnnotations, certain operations would eventually
result in a NullPointerException. This is to be expected; however, the
NullPointerException is often swallowed and only logged at INFO level
with an exception message similar to the following.

> Failed to introspect annotations on org.example.MyClass: NullPointerException

In such cases, the INFO log message is not helpful in diagnosing the
problem. Furthermore, since the exception is swallowed, the desired
operation (e.g., MergedAnnotations.stream(...)) simply returns no
results.

This commit improves the user experience by eagerly asserting non-null
preconditions for required arguments in MergedAnnotations.from()
factory methods.

Closes gh-25568
2020-08-08 12:21:15 +02:00
Sam Brannen
a614abe17b Polish Javadoc for MergedAnnotations 2020-08-08 11:59:24 +02:00
Brian Clozel
3c832f0ec8 Upgrade ActiveMQ and extend timeout in STOMP tests 2020-08-08 11:44:16 +02:00
Juergen Hoeller
e87a49c61c Merge branch '5.2.x' 2020-08-07 21:43:33 +02:00
Juergen Hoeller
292f581cdd Populate dependencies metadata for resolved target behind lazy dependency proxy
Closes gh-25562
2020-08-07 21:42:02 +02:00
Brian Clozel
617ec359bd Update after MonoProcessor deprecation in Reactor
This commit adapts the usage of `MonoProcessor` after deprecations
introduced in reactor/reactor-core#1053
2020-08-07 18:59:21 +02:00
Juergen Hoeller
922f9452f2 Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-08-07 16:05:14 +02:00
Juergen Hoeller
686f5d4a5e Upgrade to Jackson 2.10.5 2020-08-07 15:55:10 +02:00
Juergen Hoeller
3b9558a269 Polishing 2020-08-07 15:51:33 +02:00
Juergen Hoeller
a6af1def57 Polishing 2020-08-07 13:31:21 +02:00
Juergen Hoeller
f4c0ceb1cc Merge branch '5.2.x'
# Conflicts:
#	build.gradle
#	spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslationInterceptor.java
#	spring-web/src/main/java/org/springframework/web/bind/support/WebRequestDataBinder.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractHandlerMapping.java
2020-08-07 13:15:36 +02:00
Juergen Hoeller
692c5f292d Polishing 2020-08-07 13:11:48 +02:00
Juergen Hoeller
7fdb33a105 Upgrade to Jetty 9.4.31, Groovy 2.5.13, Hibernate ORM 5.4.19, EclipseLink 2.7.7, Checkstyle 8.35 2020-08-07 13:03:28 +02:00
Juergen Hoeller
8dd285f877 Polishing 2020-08-07 13:02:43 +02:00
Juergen Hoeller
94eee6a32a Provide access to AbstractRoutingDataSource's resolved target DataSources
Closes gh-25544
2020-08-07 13:00:35 +02:00
Juergen Hoeller
96a4e1150e Avoid unnecessary computation of cleaned URL
Closes gh-25531
2020-08-07 12:59:41 +02:00
Juergen Hoeller
14839b1f4a Sort detected PersistenceExceptionTranslator beans
Closes gh-24644
2020-08-07 12:08:03 +02:00
Juergen Hoeller
b345019415 Introduce getBeanProvider variants with allowEagerInit flag
Closes gh-25559
2020-08-07 12:07:13 +02:00
Stephane Nicoll
392f51cdd6 Merge branch '5.2.x' 2020-08-07 11:06:21 +02:00
Stephane Nicoll
6acbc5093a Indicate caches should be initialized in SimpleCacheManager
Closes gh-22988
2020-08-07 11:01:39 +02:00
Tadaya Tsuyukubo
83df467b3b Remove @Nullable from CookieLocaleResolver#determineDefaultLocale()
By definition, this method should not return `null`.
2020-08-07 10:51:02 +02:00
Stephane Nicoll
4d446f9659 Polish 2020-08-07 10:40:00 +02:00
Stephane Nicoll
f3cedf268b Consistently support LoadingCache
This commits make sure that CaffeineCache handles consistently the
contract of LoadingCache.

Closes gh-25173
2020-08-07 10:38:27 +02:00
Juergen Hoeller
b6ef3cfad5 Refactor HandlerExecutionChain towards List-centric interceptor storage
Closes gh-25500
2020-08-07 00:32:52 +02:00
Juergen Hoeller
d61c0ee57d Consistent support for path variable and multipart binding
Closes gh-24107
Closes gh-22169
Closes gh-25265
2020-08-06 18:28:09 +02:00
Brian Clozel
5bdbbdfcfb Require RSocket 1.0+
This commit removes the previously deprecated classes in Spring
Framework 5.2.x. By doing so, Spring Framework now requires RSocket
1.0+.

Closes gh-25548
2020-08-06 14:45:38 +02:00
Sam Brannen
2087f3586c Merge branch '5.2.x' 2020-08-06 14:26:21 +02:00
diguage
0501999e43 Fix comment syntax in xml examples
See gh-25537
2020-08-06 14:25:30 +02:00
Juergen Hoeller
c99c3142ad HibernateJpaDialect/HibernateTransactionManager alignment for 5.2+
See gh-25533
2020-08-06 12:00:20 +02:00
Brian Clozel
df98d0c661 Update CI to concourse-release-scripts 0.2.0 2020-08-06 10:17:19 +02:00
Brian Clozel
38690bdc7c Upgrade CI image to jdk8u265-b01 2020-08-06 10:05:13 +02:00
Stephane Nicoll
6d164b1445 Merge branch '5.2.x' 2020-08-06 09:30:17 +02:00
Stephane Nicoll
b6842730f7 Merge pull request #25539 from diguage
* pr/25539:
  Fix asciidoctor syntax for source

Closes gh-25539
2020-08-06 09:27:38 +02:00
diguage
5cb2cc2466 Fix asciidoctor syntax for source
See gh-25539
2020-08-06 09:27:09 +02:00
Stephane Nicoll
c7b74c4358 Merge pull request #25537 from diguage
* pr/25537:
  Fix comment syntax in xml examples

Closes gh-25537
2020-08-06 09:10:42 +02:00
diguage
e150a95685 Fix comment syntax in xml examples
See gh-25537
2020-08-06 09:10:10 +02:00
Sam Brannen
dded51fa80 Merge branch '5.2.x' 2020-08-05 17:47:44 +02:00
Sam Brannen
96da1ff9ea Support @RestControllerAdvice in Standalone MockMvc again
Since Spring Framework 5.2, @RestControllerAdvice registered with
MockMvc when using MockMvcBuilders.standaloneSetup() has no longer been
properly supported if annotation attributes were declared in the
@RestControllerAdvice annotation. Prior to 5.2, this was not an issue.

The cause for this regression is two-fold.

1. Commit 50c257794f refactored
   DefaultListableBeanFactory so that findAnnotationOnBean() supports
   merged annotations; however, that commit did not refactor
   StaticListableBeanFactory#findAnnotationOnBean() to support merged
   annotations.

2. Commit 978adbdae7 refactored
   ControllerAdviceBean so that a merged @ControllerAdvice annotation
   is only looked up via ApplicationContext#findAnnotationOnBean().

The latter relies on the fact that findAnnotationOnBean() supports
merged annotations (e.g., @RestControllerAdvice as a merged instance of
@ControllerAdvice). Behind the scenes, MockMvcBuilders.standaloneSetup()
creates a StubWebApplicationContext which internally uses a
StubBeanFactory which extends StaticListableBeanFactory. Consequently,
since the implementation of findAnnotationOnBean() in
StaticListableBeanFactory was not updated to support merged annotations
like it was in DefaultListableBeanFactory, we only see this regression
with the standalone MockMvc support and not with MockMvc support for an
existing WebApplicationContext or with standard Spring applications
using an ApplicationContext that uses DefaultListableBeanFactory.

This commit fixes this regression by supporting merged annotations in
StaticListableBeanFactory#findAnnotationOnBean() as well.

Closes gh-25520
2020-08-05 17:40:16 +02:00
Sam Brannen
40fc472c70 Polish ExceptionHandlerTests 2020-08-05 17:24:45 +02:00
Juergen Hoeller
ba65cef52b Upgrade Hibernate support baseline to 5.2+
Closes gh-25533
Closes gh-22326
2020-08-05 14:14:31 +02:00
Brian Clozel
b6d2a2980d Update for Reactor API changes 2020-08-05 13:31:39 +02:00
Arjen Poutsma
b0d273e047 Polishing 2020-08-05 11:26:25 +02:00
Arjen Poutsma
4d670ee25d Drop support for standalone "L" in CronExpression
This commit removes support for a standalone "L" in the
day-of-week of a cron expression, which used a locale-dependent
API to determine what the last day of the week is (Saturday or
Sunday ?).
Alternatively, we could have implement this in the exact way as Quartz
has done (i.e. treat the "L" like "SAT"), but we opted not to do that,
as having an explicit SAT or SUN is much clearer.
2020-08-05 09:42:18 +02:00
Arjen Poutsma
762cf0ffe8 Check for asterisk range in CronExpression
This commit makes sure that in CronExpression, the asterisk is only used
in a range field, and is not surrounded by unexpected characters.

Closes gh-19500
2020-08-04 16:34:02 +02:00
Sam Brannen
3dc4f43852 Merge branch '5.2.x' 2020-08-04 15:13:35 +02:00
Sam Brannen
7a31885ae5 Fix bug in StaticListableBeanFactory.isSingleton()
Prior to this commit, StaticListableBeanFactory.isSingleton() returned
false for singleton beans unless they were created by a FactoryBean.

StaticListableBeanFactory.isSingleton() now properly returns true for
all beans not created by a FactoryBean.

Closes gh-25522
2020-08-04 15:13:10 +02:00
Stephane Nicoll
1dcd7f418f Access connection factory from DatabaseClient
This commit provides an accessor for the underlying ConnectionFactory
that a DatabaseClient uses.

Closes gh-25521
2020-08-04 11:47:34 +02:00
Stephane Nicoll
673f83e388 Adapt to API changes in the latest reactor snapshot 2020-08-04 11:41:30 +02:00
Arjen Poutsma
93b53dae29 Add support for Quartz features in CronExpression
This commit introduces support for Quartz-specific features in
CronExpression. This includes support for "L", "W", and "#".

Closes gh-20106
Closes gh-22436
2020-08-04 08:41:18 +02:00
Arjen Poutsma
1a8906bdc3 Support macros in CronExpression
This commit introduces supports for macros like "@yearly", "@monthly",
etc. in CronExpression.

Closes gh-25471
2020-08-04 07:51:32 +02:00