Commit Graph

1989 Commits

Author SHA1 Message Date
Stéphane Nicoll
c99e7f8616 Ignore InstanceSupplier for getBean with arguments
Previously, a BeanDefinition that has an instance supplier would be
used irrespective of custom arguments being provided. This commit only
applies the instance supplier if no arguments are provided. With
custom arguments, the regular lookup takes place based on the
information provided in the bean factory.

Closes gh-32657
2024-04-22 16:59:31 +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
0e0397a385 Polishing 2024-04-18 12:18:18 +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
Juergen Hoeller
22328905da Do not extract FactoryBean generic in case of targetType mismatch
Closes gh-32489
2024-04-08 09:51:59 +02:00
Sébastien Deleuze
4a7c24d90f Refine null-safety
See gh-32475
2024-04-05 14:30:50 +02:00
Sébastien Deleuze
1b563f8ba4 Refine null-safety in more modules
This commit refines the null-safety in:
 - spring-jdbc
 - spring-r2dbc
 - spring-orm
 - spring-beans
 - spring-aop

See gh-32475
2024-03-26 09:46:34 +01:00
Juergen Hoeller
c531a8a705 Nullability refinements and related polishing
See gh-32475
2024-03-19 09:58:44 +01:00
Stéphane Nicoll
4983a802a7 Polish "Fix Javadoc"
See gh-32403
2024-03-09 16:02:01 +01:00
Maksim Sasnouski
abdccffa39 Fix Javadoc
This commit fixes various Javadoc issues across the code base.

See gh-32403
2024-03-09 16:02:00 +01:00
Juergen Hoeller
c1287d48e2 Polishing 2024-03-08 19:31:01 +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
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
41433d445e Polishing 2024-02-21 22:58:42 +01:00
Juergen Hoeller
7ffeb59b40 Polishing 2024-02-21 22:45:39 +01:00
Juergen Hoeller
93f0ec2fa1 Polishing 2024-02-20 15:42:15 +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
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