Commit Graph

3082 Commits

Author SHA1 Message Date
rstoyanchev 37fa82c578 Lenient rejectedValue lookup in SpringValidatorAdapter
Closes gh-29043
2024-01-08 16:39:53 +00:00
Stéphane Nicoll 1f2d29ee08 Polish 2024-01-08 17:12:33 +01:00
rstoyanchev 8552e149b5 Improve method validation for container elements
This change moves container element properties from ParameterErrors
to base class ParameterValidationResult, and makes that support
independent of whether violations are nested within a container
element bean or through constraints on container elements, e.g.
`List<@NotBlank String>`.

Closes gh-31887
2024-01-05 16:32:14 +00:00
Juergen Hoeller 9912a52bb8 Avoid getMostSpecificMethod resolution for non-annotated methods
This is aligned with AutowiredAnnotationBeanPostProcessor now.

Closes gh-31967
2024-01-07 16:33:49 +01:00
Juergen Hoeller 419e34e571 Introduce getMostSpecificMethod variant on BridgeMethodResolver
This is able to resolve the original method even if no bridge method has been generated at the same class hierarchy level (a known difference between the Eclipse compiler and regular javac).

Closes gh-21843
2024-01-07 16:33:06 +01:00
Sam Brannen f6b36a689a Introduce processInjection() in CommonAnnotationBeanPostProcessor
To align with the existing processInjection() method in
AutowiredAnnotationBeanPostProcessor, this commit introduces an analogous
method in CommonAnnotationBeanPostProcessor.

Closes gh-31956
2024-01-05 16:05:07 +01:00
Sam Brannen 4b6126c057 Polishing 2024-01-05 15:17:51 +01:00
Juergen Hoeller 07097976ef Polishing 2024-01-05 10:08:57 +01:00
Juergen Hoeller fb4fbeab50 Allow CronTrigger to resume from specified timestamp
Includes differentiation between lenient and fixed execution.
Includes default time zone resolution from scheduler-wide Clock.

Closes gh-19475
Closes gh-31948
2024-01-05 10:08:01 +01:00
Stéphane Nicoll 05ebca8677 Polish 2024-01-03 17:03:58 +01:00
juhyun 89466cb33c Fix typo in NumberFormat javadoc
See gh-31938
2024-01-03 14:27:00 +01:00
Stéphane Nicoll bf3a478990 Add support for functional registration of application listener
This commit adds a functional style registration of an application
listener for a particular event. Rather than introducing another method
at the ConfigurableApplicationContext interface level, this commit
provides a factory method in GenericApplicationListener.

Closes gh-21411
2024-01-03 13:38:08 +01:00
Sam Brannen ffddbb586e Upgrade to AssertJ 3.25.0 2024-01-02 16:45:04 +01:00
Sam Brannen a3c11fc033 Clean up warnings in tests in Gradle build 2024-01-02 16:44:52 +01:00
Brian Clozel ec5f566ba5 Fix Scheduled observation convention for lambdas
Prior to this commit, the `DefaultScheduledTaskObservationConvention`
would fail as it tried to add a `KeyValue` to the observation context
that is `null`. This is rejected by the observation registry and should
be prevented. This happened when registered scheduled methods were
lambdas or part of anonymous classes. Those types do not have a
canonical name and return `null` as a value there.

This commit ensures that for these cases, the default convetion uses a
`"ANONYMOUS"` value as the `"code.namespace"` keyvalue.

Fixes gh-31918
2024-01-02 15:12:26 +01:00
Stéphane Nicoll e22d1efdc0 Update copyright year of changed files
See gh-31930
2024-01-01 11:00:56 +01:00
Johnny Lim ff8097d37c Polish
See gh-31930
2024-01-01 10:59:35 +01:00
Stéphane Nicoll 3c5d46166e Polish "Replace if with switch where feasible"
See gh-31916
2023-12-28 13:33:32 +01:00
Yanming Zhou cfa3aa001f Replace if with switch where feasible
See gh-31916
2023-12-28 13:29:50 +01:00
Stéphane Nicoll a6e87b40c7 Polish "Use diamond operator where feasible"
See gh-31916
2023-12-28 13:14:26 +01:00
Yanming Zhou 094479b55f Use diamond operator where feasible
See gh-31916
2023-12-28 13:08:08 +01:00
Yanming Zhou db2c532c07 Use auto boxing and unboxing where feasible
See gh-31916
2023-12-28 13:01:44 +01:00
Yanming Zhou 4a450c6fab Use enhanced for loop where feasible
See gh-31916
2023-12-28 13:01:44 +01:00
Stéphane Nicoll 7cfff4049d Polish "Remove unnecessary final modifier"
See gh-31916
2023-12-28 13:01:44 +01:00
Yanming Zhou 45080e3724 Remove unnecessary final modifier
final is useless for private and static methods

See gh-31916
2023-12-28 13:01:43 +01:00
Yanming Zhou 36a72115f9 Fix @Nested class not be executed
See gh-31914
2023-12-28 11:37:47 +01:00
Johnny Lim 088be2d017 Add Javadoc since to CacheOperationContext.getGeneratedKey()
See gh-31912
2023-12-28 11:25:36 +01:00
Juergen Hoeller a338a16b29 Polishing 2023-12-27 23:23:38 +01:00
Juergen Hoeller 17d362fa85 Document limited concurrency with fixed-delay tasks on virtual threads
Closes gh-31900
2023-12-26 10:59:13 +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
Juergen Hoeller 232225b2aa Polishing 2023-12-22 13:06:29 +01:00
Juergen Hoeller 44c652ec98 Introduce ProxiedInterfacesCache for JdkDynamicAopProxy
Closes gh-30499
2023-12-22 11:55:59 +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
Sam Brannen 3ed5a90b7c Fix assertions in ReactiveCachingTests 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
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 1bd523f6b6 Polish 2023-12-20 09:52:55 +01:00
Juergen Hoeller d4406507d0 Polishing 2023-12-14 00:12:22 +01:00
Juergen Hoeller a612518f96 Check startup/shutdown thread state for close bypass in shutdown hook
See gh-31811
2023-12-14 00:12:12 +01:00
rstoyanchev ec0ec7a0d6 Avoid nested constructor binding if there are no request parameters
Closes gh-31821
2023-12-13 18:06:16 +00:00
Sam Brannen 8d4deca2a6 Introduce test for XML replaced-method element without explicit arg-type
This commit introduces an integration test for the regression fixed in
the previous commit (cd64e6676c).

Closes gh-31826
2023-12-13 15:04:15 +01:00
Sam Brannen c0683cd30b Update copyright headers 2023-12-12 14:51:03 +01:00
Sam Brannen 1c58511cb2 Polishing 2023-12-12 14:51:03 +01:00
Juergen Hoeller 240a75f313 Polishing 2023-12-12 12:40:04 +01:00
Juergen Hoeller 6dcba4de2c Avoid double proxying for @Resource @Lazy fallback autowiring
Includes refactored @Resource resolver for AOT with lazy resolution support.

Closes gh-31447
See gh-29614
2023-12-12 12:39:59 +01:00
Juergen Hoeller 6bb9775309 Declare isStatic and releaseTarget as default methods on TargetSource
Closes gh-31820
2023-12-12 12:39:52 +01:00