Commit Graph

24828 Commits

Author SHA1 Message Date
Sam Brannen 279f9647ab Merge branch '5.3.x' 2022-05-31 16:14:16 +02:00
Sam Brannen aa8802a81d Avoid new AssertJ deprecations 2022-05-31 16:13:31 +02:00
Sam Brannen ee209de9cf Merge branch '5.3.x'
# Conflicts:
#	spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java
#	spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java
#	spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java
#	spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java
#	spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java
2022-05-31 14:15:36 +02:00
Sam Brannen 1beb7068f6 Use new AssertJ exception assertions 2022-05-31 14:08:28 +02:00
Sam Brannen 9d324e59a0 Upgrade to AssertJ 3.23.0 2022-05-31 12:55:43 +02:00
Sam Brannen b659030867 Merge branch '5.3.x' 2022-05-31 12:01:39 +02:00
Sam Brannen 8547f8601d Polish LocaleResolver tests 2022-05-31 11:55:30 +02:00
Stephane Nicoll a46b71a4b9 Merge branch '5.3.x' 2022-05-31 10:01:50 +02:00
Stephane Nicoll 40cb81470b Merge pull request #28542 from eltociear
* pr/28542:
  Fix typo in webflux.adoc

Closes gh-28542
2022-05-31 10:01:30 +02:00
Ikko Ashimine 6e3b3c5419 Fix typo in webflux.adoc
See gh-28542
2022-05-31 10:01:13 +02:00
Sam Brannen a3ee27bb4d Polishing 2022-05-30 20:00:07 +02:00
Sam Brannen b79f981510 Document Checkstyle issue regarding instanceof pattern variables
See https://github.com/checkstyle/checkstyle/issues/10969
2022-05-30 19:58:21 +02:00
Sam Brannen 16f65e59b4 Polish contribution
See gh-28188
2022-05-30 19:35:28 +02:00
Sam Brannen 43dd813ee6 Temporary workaround for Checkstyle bug
Attempting to name a variable in an "instanceof pattern" the same as
a field results in a Checkstyle violation similar to the following if
the "instanceof pattern matching" is located within a constructor.

Reference to instance variable 'document' needs "this.". [RequireThis]

See gh-28188
2022-05-30 19:35:28 +02:00
diguage bbaf7578b2 Apply "instanceof pattern matching" in spring-core
Closes gh-28188
2022-05-30 19:29:48 +02:00
Sam Brannen 720261db26 Use List.of() and Set.of() where feasible 2022-05-30 18:42:48 +02:00
Sam Brannen ad46f0295c Apply "instanceof pattern matching" 2022-05-30 18:41:25 +02:00
Sam Brannen b629487b44 Polish Javadoc for MockFilterChain 2022-05-30 18:41:25 +02:00
Phillip Webb 6f71328ba6 Don't implicitly filter all AOT processor beans
Update `BeanDefinitionMethodGeneratorFactory` to not implicitly filter
AOT processor beans if they also implement
`BeanRegistrationExcludeFilter`.

Most AOT processor beans generate code that replaces themselves, so
implicitly filtering them is the right thing to do. However, some beans
may need to perform AOT processing and still get registered when the
AOT processed application runs. These beans can now additionally
implement `BeanRegistrationExcludeFilter` to signal that they should
not be implicitly filtered.

Closes gh-28526
2022-05-26 20:59:50 -07:00
Phillip Webb efa8ffb728 Polish 2022-05-26 20:56:06 -07:00
Phillip Webb 718ef42d68 Exclude @Reflective from @AliasFor collection
Update `RuntimeHintsUtils` to skip `@Reflective` annotations when
checking for `@AliasFor`. Since the `@Reflective` annotation is only
used at AOT processing time, we shouldn't need a hint for it.

See gh-28528
2022-05-26 20:56:06 -07:00
Stephane Nicoll 86a85f558c Fix introspection of annotations that use local aliased attributes
Closes gh-28528
2022-05-26 15:50:41 +02:00
Sam Brannen 9e1d0057bc Merge branch '5.3.x' 2022-05-25 11:30:42 +02:00
Sam Brannen a221835558 Throw IllegalStateException for invalid port in HierarchicalUriComponents
Prior to this commit, getPort() in HierarchicalUriComponents threw a
NumberFormatException for an invalid port supplied as a String, which
was inconsistent with exception handling elsewhere in the class as well
as within the same method.

This commit introduces a try-catch block in getPort() to consistently
throw IllegalStateExceptions for ports that cannot be parsed.

Closes gh-28521
2022-05-25 11:29:12 +02:00
Sam Brannen aa06a09dee Polishing 2022-05-25 11:29:12 +02:00
Stephane Nicoll 059b66bf26 Register annotation based on its type
This commit improves registerAnnotation to use the annotation type
rather than a `MergedAnnotation` attribute.

See gh-28497
2022-05-25 10:30:43 +02:00
Sam Brannen a60e9d6695 Merge branch '5.3.x' 2022-05-24 17:16:58 +02:00
hsteinmueller bde0931e51 Fix Javadoc for DatabaseClient
The documentation for DatabaseClient had misplaced double quotes in the
example on how to map a select statement to a row.

Closes gh-28520
2022-05-24 17:15:44 +02:00
Sam Brannen 291f784196 Suppress warning in test 2022-05-24 17:12:16 +02:00
Sam Brannen 19b436c6aa Support module path scanning for "classpath*:" resource prefix
Prior to this commit, searching for classpath resources using the
"classpath*:" resource prefix did not find all applicable resources for
applications deployed as modules -- for example, when test classes and
resources are patched into the application module automatically by
Maven Surefire.

This affected component scanning -- for example, via [@]ComponentScan --
and PathMatchingResourcePatternResolver.getResources(String) in
general.

This commit addresses this by introducing first-class support for
scanning the module path when PathMatchingResourcePatternResolver's
getResources(String) method is invoked with a location pattern using
the "classpath*:" resource prefix. Specifically, getResources(String)
first searches all modules in the boot layer, excluding system modules.
It then searches the classpath using the existing Classloader-based
algorithm and returns the combined results.

Closes gh-28506
2022-05-24 12:09:36 +02:00
Stephane Nicoll 6bd25f60dd Polish 2022-05-24 11:57:14 +02:00
rstoyanchev ff890bc1cc Support custom HTTP method for @HttpExchange
Closes gh-28504
2022-05-24 09:27:35 +01:00
rstoyanchev 48c1746693 Refactor HttpServiceProxyFactory for use as a bean
Closes gh-28505
2022-05-24 09:27:17 +01:00
Sam Brannen 29a9016809 Merge branch '5.3.x' 2022-05-23 20:36:47 +02:00
Sam Brannen 7b95c928d1 Fix Javadoc for ResourcePatternResolver 2022-05-23 20:32:01 +02:00
Sam Brannen 53f88d455f Fix Javadoc for AbstractFileResolvingResource.isFile(URI) 2022-05-23 20:32:01 +02:00
Sam Brannen 53a506f6bb Polishing 2022-05-23 20:22:37 +02:00
Sam Brannen f07e7ab39d Create UrlResource factory methods that throw unchecked exceptions
UrlResource constructors throw checked exceptions which makes it
difficult to use them in java.util.Stream and java.util.Optional APIs
or other scenarios when a checked IOException is undesirable.

To support such use cases, this commit introduces `from(URI)` and
`from(String)` factory methods in UrlResource that throw
UncheckedIOExceptions.

Closes gh-28501
2022-05-23 14:22:52 +02:00
Sam Brannen 4515180195 Polish PathMatchingResourcePatternResolver 2022-05-23 14:22:43 +02:00
rstoyanchev 5e979af95a Merge branch '5.3.x' 2022-05-23 11:24:58 +01:00
rstoyanchev 2a2fba6a37 Resolve placeholders in HttpExchange#url
Closes gh-28492
2022-05-23 11:06:14 +01:00
rstoyanchev ce568468ae Refine JSON encoding of non-streaming Flux
Closes gh-28398
2022-05-23 11:06:14 +01:00
rstoyanchev 496c1dcae1 Add RequestAttributeArgumentResolver
Closes gh-28458
2022-05-23 11:06:14 +01:00
rstoyanchev 495507e5d4 AbstractNamedValueArgumentResolver supports Object values
See gh-28458
2022-05-23 11:06:14 +01:00
rstoyanchev f95bf96ec9 Correct path encoding/decoding in PathResourceResolver
Decoding is required for non-UrlResource when the HandlerMapping is
not expected to decode the path. Encoding is the opposite.

This commit ensures correct determination of whether the HandlerMapping
is expected to have decoded the path or not that in turn depends on
whether PathPattern or PathMatcher is in use.

Closes gh-27791
2022-05-23 11:03:42 +01:00
rstoyanchev 66a5742df3 Polishing 2022-05-23 10:07:03 +01:00
Stephane Nicoll 2f94713078 Make sure that annotation hierarchy is registered
This commit improves registerAnnotation to also registers the meta
annotation sources, if any. Without them, the annotation could not
be fully resolved.

See gh-28497
2022-05-23 08:57:02 +02:00
Sam Brannen 16a4a9ad3f Polishing 2022-05-21 14:30:46 +02:00
Sam Brannen ea9b1fccbd Fix attribute return types in @PutExchange
The return types for the `value` and `url` attributes don't match those
in `@HttpExchange`.

See gh-28498
2022-05-21 14:28:47 +02:00
Eddú Meléndez 163bad38ef Fix attribute return types in @DeleteExchange and @PatchExchange
The return types for the `value` and `url` attributes don't match those
in `@HttpExchange`.

Closes gh-28498
2022-05-21 14:25:00 +02:00