Commit Graph

28856 Commits

Author SHA1 Message Date
Juergen Hoeller 17d362fa85 Document limited concurrency with fixed-delay tasks on virtual threads
Closes gh-31900
2023-12-26 10:59:13 +01:00
Juergen Hoeller a428955438 Avoid unnecessary DatabasePopulator init/destroy processing
Closes gh-23405
2023-12-23 13:40:12 +01:00
Brian Clozel 4afac17e58 Reject invalid forwarded requests in ForwardedHeaderFilter
Prior to this commit, the `ForwardedHeaderFilter` and the forwarded
header utils would throw `IllegalArgumentException` and
`IllegalStateException` when request headers are invalid and cannot be
parsed for Forwarded handling.

This commit aligns the behavior with the WebFlux counterpart by
rejecting such requests with HTTP 400 responses directly.

Fixes gh-31842
2023-12-22 17:27:06 +01:00
Sébastien Deleuze 8bd8c4f627 Add support for `@Async` Kotlin function returning `Unit?`
Closes gh-31881
2023-12-22 15:33:34 +01:00
Stéphane Nicoll 0390709577 Use proper Oracle dialect for Hibernate 6+
This commit fixes the Hibernate dialect lookup for Oracle as it was
previously using a dialect that has been moved and deprecated to a
separate project. In recent versions, the standard OracleDialect is the
one we should be using.

Closes gh-31892
2023-12-22 15:22:01 +01:00
Stéphane Nicoll 9f2970bc5c Use non deprecated MySQL dialect for Hibernate 6+
This commit fixes the Hibernate dialect lookup for MySQL as it was
previously using a deprecated dialect that has been removed in the most
recent Hibernate version.

Closes gh-31889
2023-12-22 15:03:40 +01:00
Juergen Hoeller 232225b2aa Polishing 2023-12-22 13:06:29 +01:00
Stéphane Nicoll 5caf714ff4 Document CGLIB restriction with methods that are effectively private
Closes gh-28973
2023-12-22 12:39:35 +01:00
Juergen Hoeller cd11219fa7 Declare proxyMetadataCache as volatile and ProxiedInterfacesCache fields as final
See gh-30499
2023-12-22 12:27:03 +01:00
Juergen Hoeller 44c652ec98 Introduce ProxiedInterfacesCache for JdkDynamicAopProxy
Closes gh-30499
2023-12-22 11:55:59 +01:00
Stéphane Nicoll cd8bc2f82a Remove useless empty inheritDoc Javadoc tag 2023-12-22 11:23:11 +01:00
Stéphane Nicoll 12f6330fae Improve code coverage of PropertyPlaceholderHelper
See gh-26268
2023-12-22 11:07:16 +01:00
Juergen Hoeller fc0ea465e1 Clarify expectations for getBean call with provided arguments
Closes gh-24955
2023-12-21 19:32:38 +01:00
rstoyanchev 459338f6fd Unwrap Optional in MethodValidationAdapter
See gh-31746
2023-12-21 17:55:49 +00:00
rstoyanchev f0add920f5 Adjust container types to which methodValidation
After the updates to MethodValidationAdapter in commit d7ce13 related
to method validation on element containers, we also need to adjust
the checks in HandlerMethod when method validation applies.

See gh-31746
2023-12-21 17:50:40 +00:00
rstoyanchev 33c149077a Check constraints on container elements
We now check for constraint annotations on elements of a
container to decide whether to apply method validation.

Closes gh-31870
2023-12-21 17:35:19 +00:00
Baoyi Chen e00a882333 Complete Jetty frame callback when opcode is not PONG
The onWebSocketFrame method should complete callback.
For more details, see https://github.com/jetty/jetty.project/issues/11088.

Closes gh-31869
2023-12-21 17:56:26 +01:00
Sam Brannen 3ed5a90b7c Fix assertions in ReactiveCachingTests 2023-12-21 17:30:56 +01:00
Sam Brannen 3476402a75 Polish switch statements 2023-12-21 17:30:56 +01:00
Juergen Hoeller b04803de99 Polishing 2023-12-21 17:20:29 +01:00
Juergen Hoeller f443cf965a Introduce NoOpTaskScheduler for test setups
Closes gh-28073
2023-12-21 17:20:24 +01:00
Stéphane Nicoll c9292f8e09 Replace Twitter reference to 𝕏 2023-12-21 15:56:20 +01:00
Juergen Hoeller bd65a19d71 Introduce write method fallback step for overloaded setter methods
Closes gh-31872
2023-12-21 14:32:10 +01:00
Sébastien Deleuze 85cb6cc5fb Support Kotlin extensions in web handlers
This commit restores support for Kotlin extensions in
web handlers, and adds support for invoking reflectively
suspending extension functions, as well as the other
features supported as of Spring Framework 6.1 like
value classes and default value for parameters.

Closes gh-31876
2023-12-21 12:16:33 +01:00
Juergen Hoeller 5f8a031c22 Introduce "spring.cache.reactivestreams.ignore" escape hatch
Closes gh-31861
2023-12-21 11:14:33 +01:00
Juergen Hoeller dc564f3ef2 Respect cache hit when empty Mono/Flux response is returned
Closes gh-31868
2023-12-20 22:52:51 +01:00
rstoyanchev d7ce13c763 Revert use of leafBean in MethodValidationAdapter
The goal for #31530 was to support bean validation on Set and other
method parameters that are containers of value(s) for which there is
a registered Jakarta Validation ValueExtractor.

Unfortunately, bean validation does not expose the unwrapped value
for a Path.Node, which we need for a method parameter in order to
create a BindingResult for the specific bean within the container,
and the leafBean that we tried to use is really the node at the
very bottom of the property path (i.e. not what we need).

This change removes the use of beanLeaf, restores the logic as it
was before, adds support for arrays, and a new test class for
scenarios with cascaded violations.

See gh-31746
2023-12-20 17:56:05 +00:00
Stéphane Nicoll 7b9037b054 Merge pull request #31875 from izeye
* pr/31875:
  Polish Javadoc for ClientRequestObservationContext constructors

Closes gh-31875
2023-12-20 17:29:45 +01:00
Johnny Lim 3162afbf16 Polish Javadoc for ClientRequestObservationContext constructors
See gh-31875
2023-12-20 17:26:29 +01:00
Stéphane Nicoll 1bd523f6b6 Polish 2023-12-20 09:52:55 +01:00
Juergen Hoeller 4c0d0ba5b3 Use standard String comparison in PropertyDescriptorComparator
Closes gh-31866
2023-12-20 08:45:53 +01:00
Stéphane Nicoll 212346a86d Polish 2023-12-19 19:48:42 +01:00
Brian Clozel 564803f56a Trigger JDK 22 builds every morning in CI
Closes gh-31459
2023-12-19 18:39:23 +01:00
Brian Clozel df708d16e4 Add missing JDK env variable in CI script 2023-12-19 18:23:22 +01:00
Brian Clozel 848dedb576 Upgrade CI to JDK 22ea28 2023-12-19 18:08:36 +01:00
Brian Clozel 4516e0d413 Ignore XML tests on JDK 22
This is until https://bugs.openjdk.org/browse/JDK-8322216 is resolved.

See gh-31459
2023-12-19 18:06:47 +01:00
Juergen Hoeller a23375c49d Document JDBC driver requirement for KeyHolder-based update methods
Closes gh-31486
2023-12-19 17:53:32 +01:00
Brian Clozel 53b937976d Reject setups with multiple observation conventions
Prior to this commit, the `WebHttpHandlerBuilder` would only configure
a custom observation convention if there is a single convention in the
application context. It would other wise use the default.

This commit aligns with the previous Spring Boot behavior where multiple
conventions setups are rejected as invalid with
`NoUniqueBeanDefinitionException`.

Fixes gh-31864
2023-12-19 17:35:02 +01:00
Sébastien Deleuze 12f01f9b5f Add support for @RequestMapping on Kotlin property accessors
This commit refines InvocableHandlerMethod (both Servlet and
Reactive variants) in order to support annotated property
accessors as they translate into regular Java methods, instead
of throwing a NullPointerException.

Closes gh-31856
2023-12-19 12:29:55 +01:00
Sébastien Deleuze 917978cbc2 Refactor InvocableHandlerMethodKotlinTests
The variant in org.springframework.web.method.support in
order to allow testing with a various classes.

See gh-31856
2023-12-19 12:10:13 +01:00
rstoyanchev 3f5c3b1747 Fix checkstyle violation
See gh-31711
2023-12-18 15:32:18 +00:00
rstoyanchev bec7210b4b Improve check to skip bean validation in DataBinder
DataBinder should skip any jakarta.validation.Validator yielding
to method validation when that is expected. This change improves
the check to skip by unwrapping the validator from in a
SmartValidator before checking if it is for bean validation.

Closes gh-31711
2023-12-18 15:25:18 +00:00
rstoyanchev 0a94dce41d Improve HandlerMethod check when method validation applies
Method validation needs to be used for a container such as a List or
Map, but until now we were only checking for a List container.
Moreover, in gh-31530 we improved method validation to also cover
any Collection.

This change aligns with HandlerMethod check for when method validation
applies with the underlying ability of method validation.
2023-12-18 15:25:18 +00:00
Stéphane Nicoll 9b3afcdac7 Merge pull request #31845 from bohub12
* pr/31845:
  Polish "Replace deprecated usage of project.buildDir"
  Replace deprecated usage of project.buildDir

Closes gh-31845
2023-12-18 16:24:11 +01:00
Stéphane Nicoll 8eb524dc4d Polish "Replace deprecated usage of project.buildDir"
See gh-31845
2023-12-18 16:24:02 +01:00
bohub12 dee8108bbc Replace deprecated usage of project.buildDir
See gh-31845
2023-12-18 16:24:02 +01:00
Juergen Hoeller 045c5dc1b4 Detect Jetty 12 "max length exceeded" message in handleParseFailure
Closes gh-31850
2023-12-18 16:18:27 +01:00
Arjen Poutsma 24f8eac12a Improve ByteBuffer copy method
This commit improves JettyWebSocketHandlerAdapter::copyByteBuffer so
that it allocates a buffer large enough for the remaining bytes
contained in the source, instead of allocating one with the capacity of
the source.

Closes gh-31857
2023-12-18 15:23:27 +01:00
Stéphane Nicoll eaf7a28250 Write runtime hints with deterministic order
This commit updates the JSON writers to use a deterministic order for
arrays. Previously, the order could change with the same content,
breaking caching.

Closes gh-31852
2023-12-18 14:57:13 +01:00
Stéphane Nicoll 7965c1969f Merge pull request #31802 from Drezir
* pr/31802:
  Polish "Use String.repeat instead of explicit cycle"
  Use String.repeat instead of explicit cycle

Closes gh-31802
2023-12-18 14:11:35 +01:00