Sébastien Deleuze
c79e4e230b
Reinstantiate checks for kotlin-reflect
...
This commit reinstantiates checks for kotlin-reflect (via static final
fields for faster Java code paths and better native code removal) which
were removed as part of gh-34275, which did not consider the
increasingly popular use cases where kotlin-stdlib is present in the
classpath as a transitive dependency in Java applications.
Closes gh-35511
2025-09-22 18:33:38 +02:00
Sébastien Deleuze
7635ac38f6
Use uppercase for classpath-related static final field names
...
Closes gh-35525
2025-09-22 18:32:14 +02:00
Stéphane Nicoll
88812edc35
Merge branch '6.2.x'
2025-09-16 16:11:08 +02:00
Stéphane Nicoll
0a48984fab
Suppress deprecating warnings for getInstanceSupplier() method as well
...
This commit fixes code generation for a bean produced by a protected
factory method. Previously only the code generated for public methods,
i.e. without a dedicated instance supplier method, was handled.
Closes gh-35486
2025-09-16 16:08:15 +02:00
Juergen Hoeller
27221581a1
Expose getFilePath() on Resource interface for consistent NIO support
...
Closes gh-35435
2025-09-08 17:03:07 +02:00
Juergen Hoeller
410eff641c
Merge branch '6.2.x'
2025-09-03 15:46:13 +02:00
Juergen Hoeller
3a4315bf16
Keep mainThreadPrefix exposed until background init threads finished
...
Closes gh-35409
2025-09-03 15:45:12 +02:00
Juergen Hoeller
a1f5f6aa92
Merge branch '6.2.x'
2025-08-24 10:32:31 +02:00
Juergen Hoeller
0e2af5d113
Avoid default AutoCloseable implementation in ExecutorService on JDK 19+
...
Consistently calls shutdown() unless a specific close() method has been provided in a subclass.
Closes gh-35316
2025-08-24 10:30:48 +02:00
Juergen Hoeller
56269d76e5
Merge branch '6.2.x'
2025-08-22 22:02:24 +02:00
Juergen Hoeller
55181fa1c9
Polishing
2025-08-22 22:00:52 +02:00
Juergen Hoeller
c248f94e5a
Cache bean type next to primary bean names (on singleton creation)
...
This avoids singleton access for type checks in hasPrimaryConflict.
Closes gh-35330
2025-08-22 21:59:38 +02:00
Sam Brannen
887ef75700
Remove redundant declarations of JSpecify's @NonNull annotation
...
Closes gh-35341
2025-08-19 17:30:47 +02:00
Juergen Hoeller
29203d7293
Merge branch '6.2.x'
2025-08-11 14:34:17 +02:00
Juergen Hoeller
3781ba223e
Optimize NIO path resolution in PathEditor
...
Closes gh-35304
2025-08-11 14:32:39 +02:00
Juergen Hoeller
eaccb56de9
Merge branch '6.2.x'
...
# Conflicts:
# spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
2025-07-25 22:42:14 +02:00
Juergen Hoeller
8c44a61033
Invalidate cache entries for matching types after singleton creation
...
Closes gh-35239
2025-07-25 22:38:57 +02:00
Juergen Hoeller
64de254b58
Merge branch '6.2.x'
2025-07-11 22:50:47 +02:00
Juergen Hoeller
4277682a5c
Catch InaccessibleObjectException next to IllegalAccessException
...
Closes gh-35190
2025-07-11 22:44:11 +02:00
Juergen Hoeller
9406e7ee2a
Add additional javadoc notes on 7.0
...
See gh-34709
See gh-34757
2025-07-07 14:08:43 +02:00
Yanming Zhou
4969f6b742
Improve BeanFactoryExtensionsTests
...
Comparing to Java's `BeanFactory.getBean(Class<T> requiredType)`, Kotlin's `BeanFactory.getBean<T>()` supports generic type as `T`, this commit add test to cover that and add assertions.
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com >
2025-07-07 13:38:02 +02:00
Yanming Zhou
410a9ce108
Mark applicable Scope's methods as default
...
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com >
2025-07-07 13:37:47 +02:00
Sam Brannen
a80305ee71
Skip initialization of a NullBean
...
Prior to this commit, AbstractAutowireCapableBeanFactory's
initializeBean() method always attempted to initialize a NullBean.
However, invokeInitMethods() (which is invoked by initializeBean())
skips processing of a NullBean, which is logical since a NullBean will
never contain init-methods.
In practice, initialization and post-processing of a NullBean should
not result in any change to the NullBean.
This commit therefore skips initialization of a NullBean altogether.
Closes gh-35165
2025-07-07 11:12:28 +02:00
Stéphane Nicoll
6a3311ba8e
Merge branch '6.2.x'
2025-06-30 12:54:07 +02:00
Stéphane Nicoll
e88b70e6ad
Slice bean registrations in separate file if necessary
...
The compiler has a constants pool limit of 65536 entries per source file
which can be hit with a very large amount of beans to register in the
bean factory.
This commit makes sure to create separate source files if the number
of beans to register is very large. The main generated source file
delegate to those.
Closes gh-35044
2025-06-30 12:53:38 +02:00
Juergen Hoeller
02ff681c73
Merge branch '6.2.x'
...
# Conflicts:
# spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java
# spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java
2025-06-27 12:31:46 +02:00
Juergen Hoeller
bd72f1fefc
Fix inconsistencies in StaticListableBeanFactory
...
Closes gh-35119
2025-06-27 12:28:52 +02:00
Juergen Hoeller
4b44a34692
Complete treatment of RuntimeBeanReference in BeanDefinitionValueResolver
...
See gh-35101
2025-06-26 17:15:31 +02:00
Juergen Hoeller
841d9fb73b
Add public method to get bean order on DefaultListableBeanFactory
...
Closes gh-34712
2025-06-26 14:48:07 +02:00
Juergen Hoeller
c5da405314
Consistent type-based bean lookup for RuntimeBeanReference
...
See gh-35101
2025-06-26 14:47:54 +02:00
Juergen Hoeller
06ef82e9a5
Consistent type-based bean lookup for internal resolution paths
...
Includes additional tests for List/ObjectProvider dependencies.
See gh-35101
2025-06-26 12:51:55 +02:00
Juergen Hoeller
90c875144a
Merge branch '6.2.x'
...
# Conflicts:
# spring-context/src/main/java/org/springframework/context/aot/BeanFactoryInitializationAotContributions.java
# spring-context/src/test/java/org/springframework/context/aot/ApplicationContextAotGeneratorTests.java
# spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateQueryException.java
2025-06-24 22:01:58 +02:00
Juergen Hoeller
b6aa6899a8
Polishing
2025-06-24 21:58:39 +02:00
Juergen Hoeller
4190209ead
Add missing AOT support for method overrides (including @Lookup)
...
Closes gh-34642
2025-06-24 21:58:31 +02:00
Juergen Hoeller
b0eacd22e0
Support for exposing additional object types in SmartFactoryBean
...
Closes gh-35101
2025-06-24 18:51:04 +02:00
Sébastien Deleuze
294406dae9
Remove @Suppress("EXTENSION_SHADOWED_BY_MEMBER")
...
Fixed in Kotlin 2.2.0 and IntelliJ IDEA IDEA 2024.2 EAP, see
https://youtrack.jetbrains.com/issue/KT-75169 related issue.
See gh-34453
2025-06-24 11:40:23 +02:00
Spring Builds
16edf9867a
Update copyright headers in source files
...
This commit updates Java, Kotlin, and Groovy source files to use the
"<year>-present" pattern in copyright headers.
Closes gh-35070
2025-06-17 16:23:50 +02:00
Spring Builds
aee29b7f30
Update copyright headers in source files
...
This commit updates Java, Kotlin, and Groovy source files to use the
"<year>-present" pattern in copyright headers.
Closes gh-35070
2025-06-17 15:54:58 +02:00
Vincent Potucek
0d4dfb6c1f
Rename exception variables in empty catch blocks
...
The Spring codebase sometimes ignores exceptions in catch blocks on
purpose. This is often called out by an inline comment.
We should make this more obvious by renaming the exception argument in
the catch block to declare whether the exception is "ignored" or
"expected".
See gh-35047
Signed-off-by: Vincent Potucek <vpotucek@me.com >
[brian.clozel@broadcom.com: rework commit message]
Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
2025-06-15 16:11:42 +02:00
Sam Brannen
077146d636
Merge branch '6.2.x'
2025-06-09 14:12:45 +02:00
Sam Brannen
18d6a55e3e
Polishing and removal of "this." for method invocations
2025-06-09 14:10:30 +02:00
Sam Brannen
5752585bb2
Clean up warnings in build
2025-06-07 12:37:27 +02:00
Sam Brannen
0b4f7f2f9d
Remove obsolete code
...
The hasNullableAnnotation() method was made obsolete in commit
b5d153febf .
See gh-34952
See gh-34261
2025-06-07 12:23:56 +02:00
Sam Brannen
3aa3b81e1c
Update copyright headers
2025-06-06 13:49:23 +02:00
Johnny Lim
7f6a7b806e
Replace AssertionsForClassTypes with Assertions
...
Closes gh-34821
Signed-off-by: Johnny Lim <izeye@naver.com >
2025-06-06 13:49:23 +02:00
Sam Brannen
af4fc0118c
Update copyright header
2025-06-04 14:53:31 +02:00
rstoyanchev
230540b6da
Polishing contribution
...
Closes gh-34942
2025-06-04 13:46:22 +01:00
Yanming Zhou
f9fa7cc93b
Add missing "since" in @Deprecated
...
See gh-34942
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com >
2025-06-04 13:46:22 +01:00
Patrick Strawderman
9501bff1f0
Use HexFormat in CharacterEditor
...
Use HexFormat to perform conversion for unicode-prefixed Strings in CharacterEditor.
Closes gh-34798
Signed-off-by: Patrick Strawderman <pstrawderman@netflix.com >
2025-06-03 18:20:19 +02:00
Sam Brannen
45ba4ace39
Merge branch '6.2.x'
2025-06-02 17:00:50 +02:00