Commit Graph

2118 Commits

Author SHA1 Message Date
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
Sam Brannen ae6c64abc5 Fix Javadoc errors 2024-03-08 11:59:53 +01:00
Juergen Hoeller c9e85ec297 Introduce callback for singleton availability
Closes gh-21362
2024-03-07 09:57:29 +01:00
Juergen Hoeller 14a461e795 Consider type-level qualifier annotations for transaction manager selection
Closes gh-24291
2024-03-06 13:36:33 +01:00
Juergen Hoeller b5ca646431 Leniently tolerate late bean retrieval during destroySingletons()
Closes gh-22526
Closes gh-29730
2024-03-04 17:21:02 +01:00
Yanming Zhou 246ebd24bf Add missing method BeanDefinitionBuilder.setFallback() 2024-02-29 13:34:55 +01:00
Sébastien Deleuze 7c5bcbcba4 Merge branch '6.1.x' 2024-02-28 17:24:08 +01:00
Sébastien Deleuze 45c21042f6 Optimize Kotlin inline class checks
This commit fixes a performance regression caused by gh-31698,
and more specifically by KClass#isValue invocations which are slow since
they load the whole module to find the class to get the descriptor.

After discussing with the Kotlin team, it has been decided that only
checking for the presence of `@JvmInline` annotation is enough for
Spring use case.

As a consequence, this commit introduces a new
KotlinDetector#isInlineClass method that performs such check, and
BeanUtils, CoroutinesUtils and WebMVC/WebFlux InvocableHandlerMethod
have been refined to leverage it.

Closes gh-32334
2024-02-28 17:18:57 +01:00
Juergen Hoeller aeb77cf4e1 Restore correct threadWithLock check without isInfoEnabled()
See gh-23501
2024-02-28 11:47:39 +01:00
Juergen Hoeller 17b2087198 Introduce background bootstrapping for individual singleton beans
Closes gh-13410
Closes gh-19487
See gh-23501
2024-02-27 22:33:18 +01:00
Juergen Hoeller 4d206f79d0 Merge branch '6.1.x'
# Conflicts:
#	spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
2024-02-26 13:42:00 +01:00
Juergen Hoeller 479879c53a Polishing 2024-02-26 13:40:21 +01:00
Juergen Hoeller 2e57603310 Try type conversion for unique fallback write method as well
Closes gh-32329
See gh-32159
2024-02-26 13:40:05 +01:00
Juergen Hoeller 567547b63c Skip shortcut resolution for non-standard dependency descriptors
Closes gh-32326
See gh-28122
2024-02-24 18:05:23 +01:00
Juergen Hoeller 58b8330e8d Consistent documentation of defaults and related methods
See gh-32308
2024-02-23 14:41:37 +01:00
Sam Brannen b0d08fe2d4 Spring cleaning: avoid deprecation warnings 2024-02-23 12:38:40 +01:00
Sam Brannen 122372c580 Spring cleaning: update copyright headers 2024-02-23 12:21:22 +01:00
Sam Brannen 4339c8eac2 Spring cleaning: use diamond operator 2024-02-23 12:20:11 +01:00
Juergen Hoeller 3ddc512108 Add missing @Override annotations 2024-02-22 11:21:51 +01:00
Yanming Zhou 76eb5b8c19 Replace redundant javadoc with {@inheritDoc} for AbstractBeanDefinition 2024-02-22 10:59:35 +01:00
Juergen Hoeller 491ebb4ec4 Merge branch '6.1.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java
2024-02-21 23:01:09 +01:00
Juergen Hoeller 41433d445e Polishing 2024-02-21 22:58:42 +01:00
Juergen Hoeller 7ffeb59b40 Polishing 2024-02-21 22:45:39 +01:00
Sam Brannen bfed6a3bc5 Clean up warnings in Gradle build 2024-02-21 16:22:38 +01:00
Sam Brannen b9c304b890 Polish contribution
See gh-32291
2024-02-21 16:19:53 +01:00
Patrick Strawderman e1a32d4ba9 Avoid resizing of fixed-size HashSet/LinkedHashSet variants
Add helpers to CollectionUtils for building HashSets and LinkedHashSets
that can hold an expected number of elements without needing to
resize/rehash.

Closes gh-32291
2024-02-21 16:19:53 +01:00
Sam Brannen 3fb170058f Polish contribution
See gh-32294
2024-02-21 14:09:09 +01:00
Patrick Strawderman f9fe8efb2e Use ConcurrentHashMap.newKeySet
In places where a ConcurrentHashMap was used as a set by wrapping it
with Collections.newSetFromMap, switch to just using the set returned
by ConcurrentHashMap.newKeySet directly.

Closes gh-32294
2024-02-21 14:08:38 +01:00
Juergen Hoeller 889c4e0ff5 Reject multiple primary candidates in ancestor factory as well
Closes gh-26612
2024-02-20 16:24:03 +01:00
Juergen Hoeller 93f0ec2fa1 Polishing 2024-02-20 15:42:15 +01:00
Juergen Hoeller 63ca8d5d17 Consider defaultCandidate flag in case of no annotations as well
See gh-26528
2024-02-20 15:30:38 +01:00
Juergen Hoeller bc01e3116f Ignore fallback bean for shortcut resolution
See gh-26241
See gh-28122
2024-02-20 13:51:37 +01:00
Juergen Hoeller 480051a21c Introduce fallback flag and annotation (as companion to primary)
Closes gh-26241
2024-02-20 13:37:41 +01:00
Juergen Hoeller a8fb16b47c Introduce defaultCandidate flag (for plain type vs. qualified match)
Closes gh-26528
2024-02-20 12:00:47 +01:00
Juergen Hoeller a001319f1f Add additional shortcut for qualifier value matching target bean name
Closes gh-17677
See gh-28122
2024-02-19 22:39:37 +01:00
Juergen Hoeller 4a02893c31 Avoid early singleton inference outside of original creation thread
See gh-23501
2024-02-19 17:44:30 +01:00
Juergen Hoeller 902e5707a8 Revise singleton registry for lenient locking (fallback instead of deadlock)
Closes gh-23501
2024-02-19 15:49:33 +01:00
Juergen Hoeller c6146ea2db Introduce shortcut for declared dependency name matching target bean name
Closes gh-28122
2024-02-16 21:28:04 +01:00
Sam Brannen 71dfebbfe5 Polishing 2024-02-16 16:45:18 +01:00
Sam Brannen ea4e7df9ca Consistently declare ignoreUnresolvablePlaceholders as last argument 2024-02-16 15:00:32 +01:00
Sam Brannen 7c07c43201 Polishing 2024-02-16 15:00:06 +01:00
Stéphane Nicoll bcf235cc66 Merge branch '6.1.x' 2024-02-16 08:36:26 +01:00
Stéphane Nicoll 6b8105aef2 Update copyright year of changed files
See gh-32281
2024-02-16 08:33:17 +01:00
Patrick Strawderman 481283d2f1 Use Spliterator of underlying collection
Delegate to the spliterator method of the underlying collection in
MutablePropertyValues and MutablePropertySources. In both cases, those
collection types have specialized Spliterator implementations.
Delegating to these Spliterators also means the characteristics of the
Spliterator are properly set.

See gh-32281
2024-02-16 08:32:41 +01:00
Juergen Hoeller 7e67da8a26 Support for matching partial generics
Closes gh-20727
2024-02-15 16:51:09 +01:00
Stéphane Nicoll e3aa5b6b11 Use new implementation in PropertyPlaceholderHelper
This commit removes the previous implementation in favor of the new
PlaceholderParser. The only noticeable side effect is that the exception
is no longer an IllegalArgumentException, but rather the dedicated
PlaceholderResolutionException.

See gh-9628
2024-02-15 15:27:13 +01:00
Sébastien Deleuze cc6dd19324 Polishing 2024-02-13 14:29:18 +01:00
Yanming Zhou 615973cce4 Fix assertion in BeanWrapperAutoGrowingTests
See gh-32176
2024-02-01 09:34:32 +01:00
Juergen Hoeller 00577ed80a Polishing 2024-01-31 17:12:20 +01:00
Juergen Hoeller 9b2b485444 Disabled test for auto-growing nested map values
See gh-32154
2024-01-31 17:12:12 +01:00
Juergen Hoeller af5acb6d34 Avoid pre-conversion attempt in case of overloaded write methods
Closes gh-32159
See gh-31872
2024-01-30 21:57:14 +01:00
Sam Brannen db535863dd Consistently use class literals for primitive types
To improve consistency and avoid confusion regarding primitive types
and their wrapper types, this commit ensures that we always use class
literals for primitive types.

For example, instead of using the `Void.TYPE` constant, we now
consistently use `void.class`.
2024-01-30 15:26:12 +01:00
Juergen Hoeller c5a75219ce Compare qualifier value arrays with equality semantics
Closes gh-32106
2024-01-24 22:30:28 +01:00
Stéphane Nicoll f5b0d9509d Polish 2024-01-17 18:41:15 +01:00
Stéphane Nicoll 0c42965fc3 Polish 2024-01-15 11:17:19 +01:00
Sébastien Deleuze 5c77c3739e Find destroy methods in superclass interfaces
Related tests will be added in
https://github.com/spring-projects/spring-aot-smoke-tests.

Closes gh-32006
2024-01-12 11:37:42 +01:00
Stéphane Nicoll 1f2d29ee08 Polish 2024-01-08 17:12:33 +01:00
Juergen Hoeller 43107e7eb1 Propagate arguments for dynamic prototype-scoped advice
Closes gh-28407
2024-01-07 00:12:15 +01:00
Sam Brannen 580d9f81e2 Polishing 2024-01-05 17:06:32 +01:00
Sam Brannen 4b6126c057 Polishing 2024-01-05 15:17:51 +01:00
Sam Brannen 476ef0c3ca Introduce basic unit test for AutowiredAnnotationBeanPostProcessor.processInjection() 2024-01-05 13:22:29 +01:00
Stefano Cordio be9ee9112c Upgrade to AssertJ 3.25.1, use AssertJ BOM
Closes gh-31945
2024-01-04 09:55:12 +01:00
Sam Brannen ffddbb586e Upgrade to AssertJ 3.25.0 2024-01-02 16:45:04 +01:00
Stéphane Nicoll 9a1ee48d73 Merge pull request #31930 from izeye
* pr/31930:
  Update copyright year of changed files
  Polish

Closes gh-31930
2024-01-01 11:01:07 +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 7d44a4dcad Polish 2024-01-01 10:56:33 +01:00
Juergen Hoeller 0ad3800f54 Polishing 2023-12-30 11:06:16 +01:00
Stéphane Nicoll eefe65d95a Upgrade copyright year of changed files
See gh-31916
2023-12-28 13:36:58 +01:00
Yanming Zhou ea5ef098cf Use Map.computeIfAbsent() where feasible
See gh-31916
2023-12-28 13:23:48 +01:00
Stéphane Nicoll adcf236a3d Polish "Use Object.equals() where feasible"
See gh-31916
2023-12-28 13:21:46 +01:00
Yanming Zhou 72a9864788 Use Object.equals() where feasible
See gh-31916
2023-12-28 13:19:03 +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
Yanming Zhou a35384fd57 Use text block where feasible
See gh-31916
2023-12-28 13:01:44 +01:00
Stéphane Nicoll 7e5afc8bbb Update copyright year of changed files
See gh-31913
2023-12-28 11:47:17 +01:00
Yanming Zhou 7474af4f09 Cleanup kotlin sources
1. remove unused import
2. remove redundant semicolon
3. remove redundant empty constructor and SAM-constructor
4. remove unnecessary type argument
5. adjust indent

See gh-31913
2023-12-28 11:46:47 +01:00
Juergen Hoeller fc0ea465e1 Clarify expectations for getBean call with provided arguments
Closes gh-24955
2023-12-21 19:32:38 +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
Juergen Hoeller 4c0d0ba5b3 Use standard String comparison in PropertyDescriptorComparator
Closes gh-31866
2023-12-20 08:45:53 +01:00
Stéphane Nicoll d0574197ea Polish "Use String.repeat instead of explicit cycle"
See gh-31802
2023-12-18 14:10:16 +01:00
Adam Ostrožlík 63b2787da6 Use String.repeat instead of explicit cycle
See gh-31802
2023-12-18 13:54:03 +01:00
dogglezz 503ccb577c Remove unused imports
Closes gh-31851
2023-12-15 09:35:17 +01:00
Juergen Hoeller d4406507d0 Polishing 2023-12-14 00:12:22 +01:00
Juergen Hoeller cd64e6676c Prepare method overrides when bean class gets resolved
See gh-31826
2023-12-13 14:33:13 +01:00
Stéphane Nicoll 409cecfff9 Add custom code generation for bean definition property values
This commits allows ValueCodeGenerator$Delegate implementations to be
loaded from `META-INF/spring/aot.factories` and considered for code
generation of bean definition property values. This default behavior
in DefaultBeanRegistrationCodeFragments can be customized as usual.

Closes gh-31427
2023-12-13 07:14:55 +01:00
Stéphane Nicoll 3c2c9ca186 Extract value code generation to make it reusable
This commit introduces ValueCodeGenerator and its Delegate interface
as a way to generate the code for a particular value. Implementations
in spring-core provides support for common value types such a String,
primitives, Collections, etc.

Additional implementations are provided for code generation of bean
definition property values.

Closes gh-28999
2023-12-13 07:05:58 +01:00
Stéphane Nicoll c75c0ae2d5 Make sure interface method has hints for init/destroy invocation
This commit matches the behavior of the core container when it
invokes a custom init or destroy method. If the custom method is an
interface implementation, the core container attempts to invoke the
method that's defined on the interface. This commit makes sure to also
register a hint for the interface method.

Closes gh-31819
2023-12-12 14:57:35 +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
Stéphane Nicoll b85fcb6aec Polish 2023-12-12 13:56:56 +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 f29bfd9769 Polishing 2023-12-10 00:28:51 +01:00
Juergen Hoeller 361dfd1ae4 Polishing 2023-12-09 23:51:18 +01:00
Juergen Hoeller 8704ad98a7 Clear caches which are not needed after singleton instantiation
Closes gh-28293
2023-12-09 23:50:54 +01:00
Yanming Zhou afcd03bddc Replace assertThat(x.isEmpty()).isTrue() with assertThat(x).isEmpty()
Search for   : assertThat\((.+).isEmpty\(\)\).isTrue\(\)
Replace with : assertThat($1).isEmpty()

Search for   : assertThat\((.+).isEmpty\(\)\).isFalse\(\)
Replace with : assertThat($1).isNotEmpty()

Closes gh-31758
2023-12-06 10:04:56 +01:00
Yanming Zhou 7b16ef90f1 Replace assertThat(x.equals(y)) with assertThat(x).isEqualTo(y)
Search for   : assertThat\((.+)\.equals\((\w+)\)\)\.isTrue\(\)
Replace with : assertThat($1).isEqualTo($2)

Search for   : assertThat\((.+)\.equals\((\w+)\)\)\.isFalse\(\)
Replace with : assertThat($1).isNotEqualTo($2)

Closes gh-31763
2023-12-06 09:50:15 +01:00
Yanming Zhou e2852e7355 Replace assertThat(x.contains(y)).isTrue() with assertThat(x).contains(y)
Search for   : assertThat\((.+)\.contains\((.+)\)\)\.isTrue\(\)
Replace with : assertThat($1).contains($2)

Search for   : assertThat\((.+)\.contains\((.+)\)\)\.isFalse\(\)
Replace with : assertThat($1).doesNotContain($2)

Closes gh-31762
2023-12-06 09:48:49 +01:00
Yanming Zhou 66e405525b Replace assertThat(x instanceof y).isTrue() with assertThat(x).isInstanceOf(y.class)
Search for   : assertThat\((.+) instanceof (\w+)\)\.isTrue\(\)
Replace with : assertThat($1).isInstanceOf($2.class)

Search for   : assertThat\((.+) instanceof (\w+)\)\.isFalse\(\)
Replace with : assertThat($1).isNotInstanceOf($2.class)

Closes gh-31760
2023-12-06 09:46:44 +01:00
Yanming Zhou 59815cefce Replace assertThat(x.get(i)). with assertThat(x).element(i).
Search for   : assertThat\((.+)\.get\((\d+)\)\)\.
Replace with : assertThat($1).element($2).

Closes gh-31759
2023-12-06 09:43:59 +01:00
Yanming Zhou 785ad399e9 Replace assertThat(x.iterator().next()) with assertThat(x).element(0)
Search for   : assertThat\((.+).iterator\(\).next\(\)\)
Replace with : assertThat($1).element(0)
2023-12-06 10:52:39 +08:00
Sam Brannen aa347e5fe6 Polish MutablePropertyValuesTests 2023-12-05 11:43:57 +01:00
Sam Brannen ceba4162bb Replace assertThat(!x).isTrue() with assertThat(x).isFalse()
Search for   : assertThat\(!(.+)\).isTrue\(\)

Replace with : assertThat(\1).isFalse()
2023-12-05 11:41:57 +01:00
Stéphane Nicoll 1da40b84e7 Polish "Use idiomatic AssertJ map assertions"
See gh-31752
2023-12-05 10:39:33 +01:00
Yanming Zhou 6f11716b6f Use idiomatic AssertJ map assertions
See gh-31752
2023-12-05 10:01:38 +01:00
Sam Brannen d71853f105 Polish contribution
See gh-31531
2023-12-04 16:47:25 +01:00
Yanming Zhou 490b5c77fc Use switch expression where feasible 2023-12-04 15:42:55 +01:00
Sam Brannen c05b4ce776 Suppress warnings in Gradle build 2023-12-01 15:44:37 +01:00
Sébastien Deleuze 16ac495084 Introduce ORDER_ATTRIBUTE on AbstractBeanDefinition
This commit allows to define a bean order programmatically
at bean definition level (functional equivalent of
`@Order`).

If specified, the order attribute defined at bean
definition level overrides potential values set with
`@Order`.

See gh-30849
2023-11-30 18:09:00 +01:00
Juergen Hoeller c56c304536 PathEditor considers single-letter URI scheme as NIO path candidate
Closes gh-29881
2023-11-30 14:16:05 +01:00
Yanming Zhou feef98b73c Correct conversion from Resource[] with length 1 to Collection<Resource>
Fix GH-31693
2023-11-30 14:05:13 +01:00
Krane 894dce7cd8 Optimize loops on BeanDefinitionPropertiesCodeGenerator
Closes gh-31650
2023-11-24 16:30:24 +01:00
Juergen Hoeller 48f3c08395 Test for mixed order across bean factory hierarchy
See gh-28374
2023-11-22 12:38:04 +01:00
Johnny Lim 2b750926c3 Polishing
Closes gh-31522
2023-10-30 15:05:20 +01:00
Stéphane Nicoll 1762bf4a60 Fix code generation for null indexed argument value
This commit fixes code generation when an indexed constructor argument
value is null as the method is overloaded and need the value to be
cast to `Object`.

Closes gh-31508
2023-10-28 10:52:26 +02:00
Stéphane Nicoll 4977ef9cea Import ConstructorResolver to handle null values
Previously, ConstructorResolver would reject any candidate if the
parameter is `null`. The reason for that is that null does not carry
any type and the matching algorithm would systematically fail for that
argument.

This commit adds an extra check, and several tests, to validate that
a null value is taken into account.

Closes gh-31495
2023-10-25 17:59:11 +02:00
Juergen Hoeller 83870e35d1 TypeDescriptor/ResolvableType cache in GenericTypeAwarePropertyDescriptor
Closes gh-31490
2023-10-24 23:13:19 +02:00
Juergen Hoeller 93b0b66735 Merge branch '6.0.x'
# Conflicts:
#	spring-beans/src/main/java/org/springframework/beans/BeanUtils.java
#	spring-core/src/main/java/org/springframework/core/ResolvableType.java
#	spring-core/src/test/java/org/springframework/core/ResolvableTypeTests.java
2023-10-24 22:58:31 +02:00
Juergen Hoeller 925fa0272b Polishing 2023-10-24 22:53:44 +02:00
Juergen Hoeller 09aa59f9e7 Avoid ResolvableType for simple assignability check in copyProperties
Closes gh-27246
2023-10-24 22:53:00 +02:00
Stéphane Nicoll 999b5d4462 Better error reporting when instance does not match factory method
This commit improves the handling of IllegalArgumentException in
SimpleInstantiationStrategy. Previously, only arguments mismatch were
handled but the exception can also be thrown if the factory instance
does not match the target method.

Closes gh-28897
2023-10-24 13:29:12 +02:00
Stéphane Nicoll 6299a9dfc9 Add tests for SimpleInstantiationStrategy 2023-10-24 13:29:12 +02:00
Juergen Hoeller 8712fdcd3b Polishing 2023-10-23 17:36:06 +02:00
Juergen Hoeller cf3a25bfac Merge branch '6.0.x' 2023-10-23 17:34:45 +02:00
Juergen Hoeller 6bdf7ad36a Polishing 2023-10-23 17:32:45 +02:00
Juergen Hoeller 6dc79b5105 Declare empty default postProcessBeanFactory method
Closes gh-31476
2023-10-23 16:56:05 +02:00
Stéphane Nicoll 3cb700c103 Merge branch '6.0.x' 2023-10-23 11:34:12 +02:00
Stéphane Nicoll f3dce4bb9a Polish "Ignore @Value on record property"
See gh-31433
2023-10-23 11:20:49 +02:00
Martin Lukas 70cb96c1d8 Ignore @Value on record property
See gh-31433
2023-10-23 11:15:24 +02:00
Sam Brannen 2d792f000a Polish "Apply SingleSpaceSeparator Checkstyle module"
See gh-31469
2023-10-22 14:18:18 +02:00
Johnny Lim 64e9fcad53 Apply SingleSpaceSeparator Checkstyle module
This commit also fixes its violations.

Closes gh-31469
2023-10-22 14:09:57 +02:00
Sam Brannen 37e6fe5b64 Update copyright headers 2023-10-22 11:28:40 +02:00
Stéphane Nicoll cf10cee16a Polish 2023-10-21 17:48:27 +02:00
Sébastien Deleuze fa57598327 Refine BeanFactory extensions to avoid type erasure when possible
Closes gh-31439
2023-10-18 13:25:42 +02:00
Johnny Lim 919faa2ce2 Order modifiers to align with JLS
This commit also applies Checkstyle ModifierOrder to enforce it.

See gh-31368
2023-10-17 16:13:56 +02:00
Stéphane Nicoll 9465ff0334 Add support for merging two BeanRegistrationAotContribution instances
Closes gh-31446
2023-10-17 12:31:06 +02:00
Sam Brannen 32b4f55d92 Update copyright headers 2023-10-16 16:19:55 +02:00
Stéphane Nicoll 607c84f960 Fix support for target arrays
This commits makes sure that a bean that produces an array can be
processed ahead of time. If the request target type is an array, its
component type is used.

Closes gh-31426
2023-10-13 15:33:32 +02:00
Stéphane Nicoll 85388aa642 Add AOT support for generic constructor argument values
This commit improves compatibility with the core container when running
in AOT mode by adding support for generic constructor argument values.

Previously, these were ignored altogether. We now have code generation
support for them as well as resolution that is similar to what
AbstractAutowiredCapableBeanFactory does in a regular runtime.

This commit also improves AOT support for XML bean configurations by
adding more support for TypedStringValue and inner bean definitions.

Closes gh-31420
2023-10-13 15:33:32 +02:00
Sam Brannen 364186e699 Polishing 2023-10-12 17:52:55 +02:00
Sam Brannen 047c2c1c20 Do not swallow failures in tests 2023-10-12 17:51:26 +02:00
Sam Brannen a4fe57a9e2 Restore imports for deprecated types in tests 2023-10-12 17:35:01 +02:00
Stephane Nicoll 37c2619fc4 Add AOT support for TypedStringValue
This commit adds support for TypeStringValue when generating AOT code.
If the value does not specify an explicit type, it's specified as is.
Otherwise, the TypeStringValue instance is restored via the appropriate
code generation.

Closes gh-29074
2023-10-12 14:11:53 +02:00
Stéphane Nicoll 15c19411f6 Harmonize exception handling
This commit applies the same catch block to orderForConsistence(Map)
than the one that's used for sets.

Closes gh-31419
2023-10-12 13:55:33 +02:00
Sam Brannen 25778e2f0e Clean up warnings in tests 2023-10-11 13:32:48 +02:00
Sam Brannen 00dde8bd88 Polishing 2023-10-11 13:32:47 +02:00
Stéphane Nicoll ea66883d79 Detect use of deprecated API
This commit is a best effort attempt at identifying the members that
code generation invokes and might be deprecated. It introduces
a CodeWarnings helper class that records warnings, with special
handling for `@Deprecated`.

See gh-29597
2023-10-10 20:08:04 +02:00
Stéphane Nicoll 35372e5e72 Simplify InstanceSupplierCodeGeneratorTests 2023-10-10 20:08:04 +02:00