Commit Graph

1787 Commits

Author SHA1 Message Date
Juergen Hoeller
fd7e7633d4 Polishing 2024-07-10 15:45:02 +02:00
Stéphane Nicoll
be7029c35d Retain previous factory method in case of nested invocation with AOT
This commit harmonizes the invocation of a bean supplier with what
SimpleInstantiationStrategy does. Previously, the current factory method
was set to `null` once the invocation completes. This did not take
into account recursive scenarios where an instance supplier triggers
another instance supplier.

For consistency, the thread local is removed now if we attempt to set
the current method to null. SimpleInstantiationStrategy itself uses
the shortcut to align the code as much as possible.

Closes gh-33185
2024-07-10 12:40:24 +02:00
Juergen Hoeller
069d0819dd Apply fallback resolution for non-hierarchical URIs such as "file:."
Includes meaningful exception message for file system resolution.

Closes gh-33124

(cherry picked from commit daea3f0eae)
2024-07-03 16:43:14 +02:00
Juergen Hoeller
5a83fc8f86 Polishing 2024-06-17 19:07:04 +02:00
Stéphane Nicoll
67686d776e Fix invalid character in Javadoc of BeanFactory 2024-06-13 14:10:00 +02:00
Juergen Hoeller
206a89017c Test detection of original generic method for CGLIB bridge method
See gh-32888
2024-05-24 12:29:31 +02:00
Juergen Hoeller
9a31f3b5a5 Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747

(cherry picked from commit 25cedcfb99)
2024-05-01 18:11:55 +02:00
Juergen Hoeller
94097fb112 Polishing (aligned with 6.1.x) 2024-04-18 12:46:55 +02:00
Juergen Hoeller
9412d782ce Revised tests for generic FactoryBean type matching (backported)
See gh-32489
2024-04-08 23:00:33 +02:00
Juergen Hoeller
a0bd13ceb1 Do not extract FactoryBean generic in case of targetType mismatch
Closes gh-32489
2024-04-08 10:16:48 +02:00
Juergen Hoeller
40d5196243 Polishing 2024-03-08 19:40:45 +01:00
Juergen Hoeller
5187281b50 Polishing 2024-02-21 22:56:21 +01:00
Juergen Hoeller
b06305e64f Compare qualifier value arrays with equality semantics
Closes gh-32106

(cherry picked from commit c5a75219ce)
2024-01-24 22:39:24 +01:00
Sébastien Deleuze
338922f03d Find destroy methods in superclass interfaces
Related tests will be added in
https://github.com/spring-projects/spring-aot-smoke-tests.

Closes gh-32017
2024-01-12 12:28:07 +01:00
Juergen Hoeller
867a199507 Propagate arguments for dynamic prototype-scoped advice
Closes gh-28407

(cherry picked from commit 43107e7eb1)
2024-01-07 00:15:43 +01:00
Juergen Hoeller
198cf063fd Polishing 2023-12-30 11:45:34 +01:00
Juergen Hoeller
033c8df53f Polishing 2023-12-22 12:54:16 +01:00
Juergen Hoeller
ccaecab500 Polishing 2023-12-14 08:32:08 +01:00
Juergen Hoeller
76bc9cf325 Prepare method overrides when bean class gets resolved
See gh-31826
See gh-31828

(cherry picked from commit cd64e6676c)
2023-12-13 15:11:29 +01:00
Juergen Hoeller
627d9cf8be Polishing 2023-12-10 00:26:22 +01:00
Juergen Hoeller
10391586d1 PathEditor considers single-letter URI scheme as NIO path candidate
Closes gh-29881

(cherry picked from commit c56c304536)
2023-11-30 14:16:37 +01:00
Juergen Hoeller
f4ac323409 Test for mixed order across bean factory hierarchy
See gh-28374

(cherry picked from commit 48f3c08395)
2023-11-22 12:46:36 +01: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
Juergen Hoeller
6bdf7ad36a Polishing 2023-10-23 17:32:45 +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
Stéphane Nicoll
fef3cf8e58 Review AOT-generated code for beanClass and targetType
This commit reviews when an AOT-generated bean definition defines a
beanClass or targetType. Previously, a beanClass was not consistently
set which could lead to issues.

Closes gh-31242
2023-09-18 16:58:01 +02:00
Stephane Nicoll
1396daa4b6 Polish "Make sure NoUniqueBeanDefinitionException to be serializable"
See gh-29753
2023-08-27 17:59:27 +02:00
Per Lundberg
1b409d5290 Make sure NoUniqueBeanDefinitionException to be serializable
See gh-29753
2023-08-27 17:56:58 +02:00
Juergen Hoeller
8b3ddeed05 Test factory-bean/method placeholders as well
See gh-20189
2023-08-14 19:28:12 +02:00
Juergen Hoeller
6baa60d454 Polishing 2023-08-12 14:51:02 +02:00
Juergen Hoeller
156b3696a7 Reinstate Introspector.flushFromCaches() call for JDK ClassInfo cache
Closes gh-27781
2023-08-07 14:51:49 +02:00
xumengqi
07a1aea9c7 Skip array sort when the length of array not greater than 1
Closes gh-30934
2023-08-04 15:25:46 +03:00
Juergen Hoeller
18966d048c Consistent equals/hashCode style (and related polishing) 2023-08-04 02:39:31 +02:00
Juergen Hoeller
7e6612a920 Sort multiple @Autowired methods on same bean class via ASM
Closes gh-30359
2023-08-04 00:47:18 +02:00
Juergen Hoeller
9333ed22f6 Avoid repeated FactoryBean targetType check
See gh-30987
2023-08-04 00:47:04 +02:00
Juergen Hoeller
4b6fabbd2f Polishing 2023-08-03 18:10:13 +02:00
Juergen Hoeller
cba2b6eaf4 Check FactoryBean targetType for generic type as well
Closes gh-30987
2023-08-03 18:10:07 +02:00
Sam Brannen
2e07a72119 Delete duplicate DummyFactory 2023-08-02 11:09:15 +03:00
Juergen Hoeller
d250a5155a Consistent dependency declarations 2023-08-02 00:56:50 +02:00
Juergen Hoeller
bbde68c49e Polishing 2023-07-25 19:12:07 +02:00
Juergen Hoeller
fdf1418dfb Polishing 2023-07-24 11:21:13 +02:00
Juergen Hoeller
2f33e77ab4 Consistent equals/hashCode style (and related polishing) 2023-07-19 00:35:19 +02:00
Juergen Hoeller
1ac0549881 Polishing 2023-07-18 12:55:32 +02:00
Juergen Hoeller
161a717639 Avoid synchronization for shortcut re-resolution
See gh-30883
2023-07-16 16:22:17 +02:00
Sam Brannen
30d6ec3398 Update copyright headers 2023-07-15 16:01:15 +02:00
Juergen Hoeller
6183f06846 Cache DependencyDescriptor per autowired constructor argument
Aligned with shortcut handling in AutowiredAnnotationBeanPostProcessor.
Includes minor MethodInvoker optimization for pre-resolved targetClass.

Closes gh-30883
2023-07-15 14:17:52 +02:00
Sam Brannen
a34f9fa66c Update copyright headers 2023-07-15 13:10:46 +02:00
Stephane Nicoll
4dc93bc485 Avoid ambiguous call with BeanInstanceSupplier#withGenerator
Previously, BeanInstanceSupplier had three variants of the
`withGenerator` callback, one with a bi function, one with a function,
and with a supplier. This could lead to compilation failure when the
target type has a method with the same name and a number of arguments
that match another variant.

It turns out the supplier-based variant is only used a shortcut. This
commit deprecates it and update ghe code generation to use the function
instead.

Closes gh-29278
2023-07-12 17:23:08 +02:00