Commit Graph

3419 Commits

Author SHA1 Message Date
Sam Brannen bcffa15c7d Reinstate qualifier support for JSR-330 @⁠javax.inject.Named
This commit revises QualifierAnnotationAutowireCandidateResolver to
reinstate "qualifier" support for the legacy JSR-330
@⁠javax.inject.Named annotation.

See gh-31090
Closes gh-33345
2024-08-08 14:20:06 +03:00
Sam Brannen 3b506e11a1 Polishing 2024-08-08 13:22:00 +03:00
Stéphane Nicoll 27aa341ab0 Merge branch '6.1.x' 2024-08-08 10:47:43 +02:00
Jonatan Ivanov 38a3d18256 Start Observation before scope open for Scheduled operation
When ScheduledAnnotationReactiveSupport adds the Observation to the
context, Reactor opens a scope through the Context Propagation API.
This happens before TrackingSubscriber would start the Observation and
opening a scope without starting an Observation is invalid.

This change moves the Observation start before the scope opening.

Closes gh-33349
2024-08-08 10:46:19 +02:00
Simon Baslé 71927b3487 Merge branch '6.1.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/scheduling/concurrent/SimpleAsyncTaskScheduler.java
2024-08-07 16:07:00 +02:00
Aleksey Genus 9b85a246d8 SimpleAsyncTaskScheduler stops accepting new tasks when isShutdown
This changes the criteria for simplified task rejection logging from
to be that the executor is in the shutdown phase, not fully terminated.

See gh-33334
Closes gh-33336
2024-08-07 15:58:27 +02:00
Stéphane Nicoll 0a2611b22f Harmonize NoUniqueBeanDefinitionException message
This commit makes sure that the programmatic exception that is thrown
by the cache abstraction uses the same message structure as a default
message produced by NoUniqueBeanDefinitionException.

Closes gh-33305
2024-08-02 16:24:43 +02:00
Simon Baslé 6174d95ba2 Add multi-unit DurationFormat.Style for duration parsing/printing
This adds the COMPOSITE style, which allows multiple segments each
similar to the SIMPLE style.

See gh-30396
Closes gh-33262
2024-07-30 16:58:42 +02:00
Stéphane Nicoll 1f2c6c33ac Merge branch '6.1.x' 2024-07-29 11:34:12 +02:00
Stéphane Nicoll 46ba13b645 Review Caching infrastructure documentation
Closes gh-33288
2024-07-29 11:29:35 +02:00
Juergen Hoeller 7c13d55906 Merge branch '6.1.x' 2024-07-29 10:48:11 +02:00
Juergen Hoeller 9d9e621efe Defensive singleton check for non-registered bean
Closes gh-33286
2024-07-29 10:47:08 +02:00
Stéphane Nicoll 2596e29013 Refine "Add AOT/Native support"
This commit review the support for AOT by only ignoring beans that are
using an instance supplier. The Kotlin DSL has a way to register a
bean by type where all inferences should happen as usual and that was
previously ignored.

This commit no longer ignores those beans so AOT can optimize them, and
makes sure that they are not registered again when running with AOT
optimizations. This change makes it so that the order in which beans are
registered is now different when running with AOT optimizations, and
we'll have to find a solution for that.

See gh-29555
2024-07-29 09:01:57 +02:00
Stéphane Nicoll 7c9bb24296 Polish 2024-07-24 13:59:06 +02:00
Stéphane Nicoll b8f9913aa1 Add AOT/Native support
This commit adds AOT/Native support for beans that are contributed by
the Kotlin DSL.

Since they use an instance supplier, such beans are now configured to
be ignored by AOT generation. They are part of the bean factory still
so any hint generation works.

This commit removes a previous attempt at fixing this issue when we
were not checking for instance suppliers. Rather than skipping the
initializr at runtime, it runs again as intended since their state
can't be stored in AOT-generated code.

Closes gh-29555
2024-07-24 13:58:36 +02:00
Sam Brannen 4fa9781549 Ensure MapAccessor#canWrite only returns true for a Map target
Closes gh-33265
2024-07-23 18:26:53 +03:00
Sam Brannen 4684a17f00 Polishing 2024-07-23 18:21:12 +03:00
Simon Baslé c92e043bbc Support multiple style of parsing/printing Durations
This commit introduces a notion of different styles for the formatting
of Duration.
The `@DurationFormat` annotation is added to ease selection of a style,
which are represented as DurationFormat.Style enum, as well as a
supported time unit represented as DurationFormat.Unit enum.

DurationFormatter has been retroffited to take such a Style,
optionally, at construction. The default is still the JDK style a.k.a.
ISO-8601.

This introduces the new SIMPLE style which uses a single number + a
short human-readable suffix. For instance "-3ms" or "2h".

This has the same semantics as the DurationStyle in Spring Boot and
is intended as a replacement for that feature, providing access to the
feature to projects that only depend on Spring Framework.

Finally, the `@Scheduled` annotation is improved by adding detection
of the style and parsing for the String versions of initial delay, fixed
delay and fixed rate.

See gh-22013
See gh-22474

Closes gh-30396
2024-07-23 11:56:48 +02:00
Stéphane Nicoll 92385418ae Polish assertion 2024-07-23 10:16:04 +02:00
Stéphane Nicoll 5331499393 Do not further process imports of Object.class
This commit filters out source classes that didn't pass a predicate
filter so that they are no longer considered.

Closes gh-27080
2024-07-22 12:31:02 +02:00
Stéphane Nicoll 5715b2a783 Fix javadoc references 2024-07-17 16:54:59 +02:00
Stéphane Nicoll 821109bd06 Polish "Add support for making MapAccessor read-only"
See gh-33222
2024-07-17 11:34:47 +02:00
Yanming Zhou a0e43b1f46 Add support for making MapAccessor read-only
See gh-33222
2024-07-17 11:32:21 +02:00
Simon Baslé 50906e7fcb Merge branch '6.1.x' 2024-07-15 11:49:47 +02:00
Simon Baslé 6becfe2508 Fix AOP for Kotlin suspending function with aspect + `@Cacheable`
This change simplifies the CacheInterceptor way of dealing with cached
coroutines, thanks to the fact that lower level support for AOP has been
introduced in c8169e5c. This fix is similar to the one applied for
`@Transactional` in gh-33095.

Closes gh-33210
2024-07-15 11:47:12 +02:00
rstoyanchev bd31e8dacc Provide access to underlying ConstraintViolation
Closes gh-33025
2024-07-12 17:35:35 +01:00
Juergen Hoeller 8cfdaaaabc Merge branch '6.1.x' 2024-07-10 15:57:24 +02:00
Juergen Hoeller f2b3263fff Polishing 2024-07-10 15:56:56 +02:00
Juergen Hoeller a9efe10428 Merge branch '6.1.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/aot/DefaultBeanRegistrationCodeFragments.java
2024-07-10 15:16:40 +02:00
Juergen Hoeller 3ccaefe38f Polishing 2024-07-10 15:15:32 +02:00
rstoyanchev 9d45a8d512 Merge branch '6.1.x' 2024-07-09 06:54:56 +01:00
rstoyanchev 3008d97f93 Polishing contribution
Closes gh-33150
2024-07-09 06:53:14 +01:00
Sébastien NUSSBAUMER f0c758498b Allow validation of Set method parameters
See gh-33150
2024-07-09 06:53:14 +01:00
Stéphane Nicoll 93587da394 Introduce ReflectiveScan
This commit allows `@Reflective` to be used on arbitrary types, not
only Spring beans. This makes the feature much more powerful as
components can be tagged directly.

Scanning happens during AOT processing (typically at build-time) when
`@ReflectiveScan` is used. Types do not need to have a particular
annotation, and types that can't be loaded are ignored.

This commit also exposes the infrastructure that does the scanning so
that custom code can do the scanning in an AOT contribution if they
don't want to rely on the annotation.

Closes gh-33132
2024-07-08 11:11:48 +02:00
Stéphane Nicoll f1658079a5 Polish documentation for RegisterReflection
See gh-29194
2024-07-06 09:31:12 +02:00
Sam Brannen c1f7d15c09 Merge branch '6.1.x' 2024-07-05 19:01:21 +02:00
Sam Brannen 83f7996c79 Polishing 2024-07-05 19:00:39 +02:00
Sam Brannen 8eb204b8dd Merge branch '6.1.x'
# Conflicts:
#	buildSrc/src/main/java/org/springframework/build/TestConventions.java
2024-07-04 17:05:38 +02:00
Sam Brannen 89338c91a9 Stop using using legacy locale data for Date/Time formatting tests
Commit 84714fbae9 introduced usage of the
-Djava.locale.providers=COMPAT command-line argument for javac in order
to allow our JDK 20 builds to pass by using legacy locale data.

That was done to ensure that Date/Time formats using AM/PM produced a
standard space (" ") before the "AM" or "PM" instead of a narrow
non-breaking space (NNBSP "\u202F"), which was introduced in Java 20
due to adoption of Unicode Common Locale Data Repository (CLDR-14032).

This commit removes usage of the -Djava.locale.providers=COMPAT
command-line argument and updates all affected tests to:

- Use an NNBSP before "AM" or "PM" in input text when running on Java 20
  or higher.

- Leniently match against any Unicode space character in formatted
  values containing "AM" or "PM".

See https://jdk.java.net/20/release-notes#JDK-8284840
See https://unicode-org.atlassian.net/browse/CLDR-14032
See gh-30185
Closes gh-33144
2024-07-04 17:03:15 +02:00
Simon Baslé 78d594c012 Merge branch '6.1.x' 2024-07-02 11:40:39 +02:00
zizare 8974da2a5a Use error handler for reactive cache aspect
This change ensures that the cache error handler is used in case of
future-based or publisher-based asynchronous caching completing with an
exception.

Closes gh-33073
2024-07-02 11:29:53 +02:00
Sam Brannen 932ce04541 Stop referring to old Spring versions in Javadoc 2024-07-01 17:50:52 +02:00
rstoyanchev acb427d460 Merge branch '6.1.x' 2024-06-28 15:35:13 +01:00
rstoyanchev c74666a883 Polishing contribution
Closes gh-33105
2024-06-28 15:32:43 +01:00
vatsal 976b4f3533 Fix return value validation
Fix argument in call to applyReturnValueValidation()
method in MethodValidationInterceptor.java. Method
argument was passed instead of the return value of the
method that was being validated.

See gh-33105
2024-06-28 15:00:11 +01:00
Sam Brannen e1567b93c2 Merge branch '6.1.x' 2024-06-27 11:40:16 +02:00
Sam Brannen 8b11ee9ee2 Document that ModelMap is not a supported argument type in WebFlux
Prior to this commit, the "Method Arguments" documentation for WebFlux
in the reference manual stated that WebFlux controller methods can
accept arguments of type Map, Model, or ModelMap to access the model.
However, ModelMap is actually not supported and results in exception
due to a type mismatch.

This commit updates the documentation to reflect this.

In addition, this commit updates related Javadoc and tests to avoid
mentioning or using ModelMap in WebFlux.

Closes gh-33107
2024-06-27 11:33:50 +02:00
rstoyanchev e48cbc5ba8 Support list/map/array constructor data binding
See gh-32426
2024-06-24 10:44:32 +01:00
Juergen Hoeller 7d236e29bb Merge branch '6.1.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java
2024-06-21 11:23:37 +02:00
Juergen Hoeller a580d6d6fc Leniently ignore type mismatch for LoadTimeWeaverAware beans
Closes gh-33082
2024-06-21 11:22:48 +02:00
Juergen Hoeller 6561490fd9 Expose isClosed() method on AbstractApplicationContext
Closes gh-33058
2024-06-17 21:08:28 +02:00
Juergen Hoeller 5c68f3f4ef Reject @Bean method with method-level @Autowired declaration
Closes gh-33051
2024-06-17 21:08:21 +02:00
Juergen Hoeller 6d5c312027 Merge branch '6.1.x' 2024-06-17 18:44:50 +02:00
Juergen Hoeller 9a56a8877f Polishing 2024-06-17 18:42:37 +02:00
Juergen Hoeller e79a9a5bff Correct and consistent event class names in constructor javadoc
Closes gh-33032
2024-06-17 18:42:30 +02:00
Juergen Hoeller 2c3c3831c1 Consistently ignore bridge method on generated subclass for visibility purposes
Closes gh-33030
2024-06-17 18:42:20 +02:00
Stéphane Nicoll e9d5d68628 Merge branch '6.1.x' 2024-06-16 09:59:21 +02:00
Stéphane Nicoll f140df881d Polish "Fix typo in comment"
See gh-33036
2024-06-16 09:57:24 +02:00
tafjwr 12cf654c98 Fix typo in comment
See gh-33036
2024-06-16 09:56:58 +02:00
Juergen Hoeller 4b58626fa4 Merge branch '6.1.x' 2024-06-14 22:09:31 +02:00
Juergen Hoeller 089e4e69f1 Do not attempt to load pre-enhanced class for reloadable classes
Closes gh-33024
2024-06-14 22:07:46 +02:00
Johnny Lim f3d390a95f Fix package description for org.springframework.validation.annotation
See gh-32532
2024-06-12 17:45:32 +02:00
Juergen Hoeller b196167f19 Merge branch '6.1.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2024-06-12 14:28:53 +02:00
Juergen Hoeller 24c8dfea1f Remove duplicated javadoc paragraph 2024-06-12 14:23:26 +02:00
Juergen Hoeller 8b8604db73 Align after merge from 6.1.x 2024-06-12 13:34:53 +02:00
Juergen Hoeller 4bb755e2d2 Merge branch '6.1.x' 2024-06-12 13:31:38 +02:00
Juergen Hoeller 0ff200b2f1 Trigger cancellation on context close for non-managed objects only
Specifically for prototype/scoped beans and FactoryBean-exposed objects.

Closes gh-33009
2024-06-12 13:31:00 +02:00
Juergen Hoeller 7a7f34f4ad Defensive access to volatile ScheduledFuture field
Includes defensive test arrangement for isInThePast() with at least 1 ms having passed.

See gh-24560
2024-06-12 13:01:58 +02:00
Brian Clozel dc2c8d6094 Add execution metadata to tasks and scheduled tasks
This commit adds new information about the execution and scheduling of
tasks.

The `Task` type now exposes the `TaskExecutionOutcome` of the latest
execution; this includes the instant the execution started, the
execution outcome and any thrown exception.

The `ScheduledTask` contract can now provide the time when the next
execution is scheduled.

Closes gh-24560
2024-06-11 19:34:41 +02:00
Stéphane Nicoll 89e894205a Improve exception message to include affected configuration class
Closes gh-32998
2024-06-11 14:24:28 +02:00
Juergen Hoeller fce2f49e46 Polishing (aligned with main) 2024-06-11 09:07:09 +02:00
Juergen Hoeller 457bf9416c Configure individual timeouts for specific shutdown phases
Closes gh-32985
2024-06-10 11:00:47 +02:00
Sébastien Deleuze c39ce10619 Merge branch '6.1.x' 2024-06-07 18:42:10 +02:00
Sébastien Deleuze 172987c874 Ignore checkpointOnRefresh after restore
Closes gh-32978
2024-06-07 18:41:37 +02:00
Juergen Hoeller 2aabe238c6 Merge branch '6.1.x'
# Conflicts:
#	spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
2024-06-06 20:47:02 +02:00
Juergen Hoeller 2451bd62b0 Polishing 2024-06-06 20:43:31 +02:00
Juergen Hoeller 624d6dd167 Expose actual result value for @CacheEvict condition
Closes gh-32960
2024-06-06 20:43:04 +02:00
Sébastien Deleuze 7b9cbd7876 Add support for Kotlin BeanPostProcessor beans
This commit adds support for Kotlin BeanPostProcessor beans which should
be defined in a companion object and annotated with `@JvmStatic`.

Closes gh-32946
2024-06-06 19:23:25 +02:00
Juergen Hoeller 28eb9aebcf Add BeanFactoryInitializer callback before preInstantiateSingletons
Closes gh-32836
2024-06-04 22:50:42 +02:00
Stéphane Nicoll 42ace2c2c9 Provide dedicated AOT exception hierarchy
This commit adds a number of catch point that provides additional
context when an AOT processor fails to execute. Amongst other things,
this makes sure that the bean name and its descriptor is consistently
provided in the error message when available.

Closes gh-32777
2024-06-04 09:36:21 +02:00
Sam Brannen b3cc603401 Avoid usage of deprecated AssertJ feature 2024-05-27 16:51:39 +02:00
Juergen Hoeller 559fec052f Merge branch '6.1.x' 2024-05-21 19:22:55 +02:00
Juergen Hoeller cd33b4e35a Polishing 2024-05-21 18:25:57 +02:00
Juergen Hoeller 0e5e81e7ef Merge branch '6.1.x' 2024-05-21 17:39:59 +02:00
Juergen Hoeller 20dea0dae2 Polishing 2024-05-21 17:39:11 +02:00
Juergen Hoeller fee17e11ba Default fallback parsing for UTC without milliseconds
Closes gh-32856
2024-05-21 17:39:06 +02:00
Juergen Hoeller f0c6fab39e Merge branch '6.1.x'
# Conflicts:
#	gradle.properties
#	spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java
2024-05-17 12:30:39 +02:00
Juergen Hoeller 617833bec9 Defensively catch and log pointcut parsing exceptions
Closes gh-32838
See gh-32793
2024-05-17 12:27:59 +02:00
rstoyanchev 3ada9a0c79 Polishing in tests of ThreadLocalAccessor implementations
See gh-32296
2024-05-13 11:41:07 +01:00
Juergen Hoeller 7b16988ec9 Merge branch '6.1.x' 2024-05-08 17:52:42 +02:00
Juergen Hoeller 0eb937a866 Document limitations of CGLIB proxy class generation in JPMS module setups
Includes extended exception messages with common hints and explanations.

Closes gh-32671
2024-05-08 17:51:17 +02:00
Juergen Hoeller d9ca263065 Merge branch '6.1.x' 2024-05-06 20:11:56 +02:00
Juergen Hoeller 05d9b52b19 Polishing 2024-05-06 20:10:40 +02:00
Juergen Hoeller 69eaf8f828 Merge branch '6.1.x' 2024-05-01 18:07:13 +02:00
Juergen Hoeller 25cedcfb99 Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747
2024-05-01 18:06:27 +02:00
Stéphane Nicoll 9492d88270 Stop wrapping low-level exceptions in CacheAspectSupport initialization
This commit replaces the IllegalStateException thrown in
CacheAspectSupport when a CacheManager cannot be determined. These were
added to provide a dedicated error message, but it is possible to do
so without hiding the more adequate exception type.

Closes gh-22442
2024-04-29 15:24:36 +02:00
Juergen Hoeller 0402ea13c0 Merge branch '6.1.x' 2024-04-24 13:42:43 +02:00
Juergen Hoeller 387e34d881 Wrap depends-on exception for specifically requested top-level bean
Closes gh-32470
2024-04-24 13:41:48 +02:00
Stéphane Nicoll 6682d75481 Merge branch '6.1.x' 2024-04-24 11:13:27 +02:00
Stéphane Nicoll 4a10bc3288 Refine preDetermineBeanTypes algorithm
This commit refines the preDetermineBeanTypes algorithm that AOT uses
to approximate the order of preInstantiateSingletons more closely.

Previously, the algorithm assumed that all beans where non-lazy
singletons in terms of initialization order, which led to inconsistent
order in CGLIB proxy generation.

We now explicitly park lazy beans so that their types are determined
during a second phase, matching the order of regular initialization
order.

Closes gh-32669

Co-authored-by: Juergen Hoeller <juergen.hoeller@broadcom.com>
2024-04-24 09:23:51 +02:00
Stéphane Nicoll a77895bd90 Merge branch '6.1.x' 2024-04-23 15:34:49 +02:00
Stéphane Nicoll 95ac0eae4a Update copyright year of changed files
See gh-32696
2024-04-23 15:32:59 +02:00
Johnny Lim cc73ccefef Polish
See gh-32696
2024-04-23 15:31:48 +02:00
Stéphane Nicoll c21090ad31 Merge branch '6.1.x' 2024-04-22 15:16:50 +02:00
Stéphane Nicoll 8a8c8fe00e Detect target of factory method with AOT
Previously, if a factory method is defined on a parent, the generated
code would blindly use the method's declaring class for both the target
of the generated code, and the signature of the method.

This commit improves the resolution by considering the factory metadata
in the BeanDefinition.

Closes gh-32609
2024-04-22 15:13:56 +02:00
Juergen Hoeller 6a1ec0ed73 Merge branch '6.1.x' 2024-04-22 13:43:57 +02:00
Juergen Hoeller ec1f5ca600 Polishing 2024-04-22 13:43:07 +02:00
Juergen Hoeller e42c5ca52b Merge branch '6.1.x' 2024-04-18 12:20:14 +02:00
Juergen Hoeller fec4f9b8cb Add test for pre-resolved target type on RootBeanDefinition
See gh-32649
2024-04-18 12:17:17 +02:00
Simon Baslé 43b5c81dad Merge branch '6.1.x' 2024-04-16 16:29:53 +02:00
xumengqi bf3278596c Include actual cause's message in various parsing exception messages
This change improves the message of several parsing-related exceptions
that would previously entirely swallow the original exception's message
and sometimes have a slightly misleading message as a result.

This is done by appending the cause's `toString` representation to the
IllegalArgumentException messages instead of an hardcoded "cause".

Closes gh-32636
2024-04-16 16:25:42 +02:00
Juergen Hoeller 77c6f160fe Merge branch '6.1.x'
# Conflicts:
#	spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java
#	spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java
#	spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverTests.java
2024-04-10 18:29:48 +02:00
Juergen Hoeller 39cd31613b Polishing 2024-04-10 18:06:32 +02:00
Sébastien Deleuze 711ddd1ac6 Merge branch '6.1.x' 2024-04-10 17:55:09 +02:00
Sébastien Deleuze ca2b3c170c Add Kotlin hints for enclosing class
This is needed by Kotlin reflection in order to be able to list
class members on native.

Closes gh-32472
2024-04-10 17:53:12 +02:00
Juergen Hoeller a9fffa844f Merge branch '6.1.x' 2024-04-09 16:15:19 +02:00
Juergen Hoeller 39b551c334 Document hand-off to execution thread (including ScheduledFuture impact)
Closes gh-32589
2024-04-09 16:14:38 +02:00
Juergen Hoeller 4eb93da31d Merge branch '6.1.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/factory/support/GenericTypeAwareAutowireCandidateResolver.java
2024-04-08 22:41:02 +02:00
Juergen Hoeller f2889b1b43 Consistent support for generic FactoryBean type matching
Closes gh-32590
See gh-32489
2024-04-08 22:39:29 +02:00
Stéphane Nicoll 62db2680f5 Merge branch '6.1.x' 2024-04-08 11:11:15 +02:00
Stéphane Nicoll 802967fc98 Add reproducer
See gh-32489
2024-04-08 11:09:56 +02:00
Sébastien Deleuze 0c42874629 Merge branch '6.1.x' 2024-04-05 14:33:20 +02:00
Stéphane Nicoll 7a74e45946 Make use of bean definition overriding more visible
This commit makes the use of bean definition overriding more visible and
prepare for a deprecation of the feature in the next major release.

As of this commit, use of bean definition overriding logs at INFO level.
The previous log level can be restored by setting the
allowBeanDefinitionOverriding flag explicitly on the BeanFactory (or
via the related ApplicationContext).

A number of tests that are using bean overriding on purpose have been
updated to set this flag, which will make them easier to find once we
actually deprecate the feature.

Closes gh-31288
2024-04-02 14:05:12 +02:00
Stéphane Nicoll 6f95af978e Merge branch '6.1.x' 2024-04-01 12:14:56 +02:00
Yanming Zhou 23d89362b0 Polish javadoc of AnnotatedBeanDefinitionReader
See gh-32560
2024-04-01 12:12:02 +02:00
Stéphane Nicoll bf5b22d64f Merge branch '6.1.x' 2024-03-26 17:45:25 +01:00
Stéphane Nicoll c7c9da56da Consistent atMost period for Awaitility-based tests
Closes gh-32537
2024-03-26 17:45:14 +01:00
Sébastien Deleuze 8b51b36729 Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in
all remaining modules except spring-test.

See gh-32475
2024-03-26 15:53:01 +01:00
Sébastien Deleuze 2fea3d7921 Merge branch '6.1.x' 2024-03-26 15:41:46 +01:00
Sébastien Deleuze 290a41d398 Refine null-safety in more modules
This commit refines the null-safety in all remaining modules
except spring-test.

See gh-32475
2024-03-26 15:39:18 +01:00
Sam Brannen 7edd4e8e22 Clean up warnings in Gradle build 2024-03-23 09:28:49 +01:00
Juergen Hoeller e58ea0d945 Merge branch '6.1.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/core/CoroutinesUtils.java
2024-03-19 10:06:48 +01:00
Juergen Hoeller c531a8a705 Nullability refinements and related polishing
See gh-32475
2024-03-19 09:58:44 +01:00
Juergen Hoeller 2086cda296 Merge branch '6.1.x' 2024-03-15 21:30:55 +01:00
Juergen Hoeller d2000efbd8 Polishing 2024-03-15 21:17:01 +01:00
Juergen Hoeller c23fd784a0 Consistently apply TaskDecorator to ManagedExecutorService as well
Closes gh-32455
2024-03-15 21:16:37 +01:00
Juergen Hoeller 66235fa8c8 Consistent TaskDecorator and ErrorHandler support in schedulers
Closes gh-23755
Closes gh-32460
2024-03-15 21:07:59 +01:00
Sam Brannen e1b1435a00 Stop referring to JDK 1.5 plus polishing 2024-03-14 16:00:51 +01:00
Stéphane Nicoll 13679bb906 Reject use of component scan with REGISTER_BEAN condition
This commit introduce a change of behaviour when component scan is used
with conditions. Previously, any condition in the REGISTER_BEAN phase
were ignored and the scan was applied regardless of the outcome of
those conditions. This is because REGISTER_BEAN condition evaluation
happens later in the bean factory preparation.

Rather than ignoring those conditions, this commit fails fast when it
detects such use case. Code will have to be adapted accordingly.

Closes gh-23206
2024-03-12 08:39:53 +01:00
Stéphane Nicoll 89f6e8ec49 Enable test now that the related issue is resolved
See gh-20765
2024-03-11 16:45:30 +01:00
Stéphane Nicoll 53ed15e4a7 Remove disabled test of declined issue
See gh-19689
2024-03-11 16:44:50 +01:00
Yanming Zhou 246e4977a2 Polishing Optional usage 2024-03-11 09:13:49 +01:00
Sam Brannen 20be9e150c Polishing 2024-03-09 14:28:01 +01:00
Juergen Hoeller fad544e077 Merge branch '6.1.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
2024-03-08 19:51:05 +01:00
Juergen Hoeller c1287d48e2 Polishing 2024-03-08 19:31:01 +01:00
Juergen Hoeller 19fec0633f Local root directory and jar caching in PathMatchingResourcePatternResolver
Closes gh-21190
2024-03-08 19:12:14 +01:00
Sam Brannen ac1176af53 Use Map#computeIfAbsent in SpEL support classes
Closes gh-32385
2024-03-07 13:55:35 +01:00
Sam Brannen dcbc2ef134 Polishing 2024-03-07 13:55:35 +01:00
Simon Baslé 7f0ab22c47 Merge branch '6.1.x' 2024-03-07 12:10:07 +01:00
Simon Baslé 6d9a2eb9b8 Improve fix of duplicate upstream subscription during reactive cache put
This commit fixes an issue where a Cacheable method which returns a
Flux (or multi-value publisher) will be invoked once, but the returned
publisher is actually subscribed twice.

The previous fix 988f3630c would cause the cached elements to depend on
the first usage pattern / request pattern, which is likely to be too
confusing to users. This fix reintroduces the notion of exhausting the
original Flux by having a second subscriber dedicated to that, but uses
`refCount(2)` to ensure that the original `Flux` returned by the cached
method is still only subscribed once.

Closes gh-32370
2024-03-07 12:08:28 +01:00