Commit Graph

23953 Commits

Author SHA1 Message Date
Sam Brannen
ddcae04ad5 Do not invoke [Map|Collection].isEmpty() in nullSafeConciseToString()
gh-30811 introduced explicit support for collections and maps in
ObjectUtils.nullSafeConciseToString() by invoking isEmpty() on a Map or
Collection to determine which concise string representation should be
used. However, this caused a regression in which an exception was
thrown if the Map or Collection was a proxy generated by
AbstractFactoryBean to support <util:set />, <util:list />, and
<util:map /> in XML configuration.

This commit addresses this set of regressions by always returning
"[...]" or "{...}" for a Collection or Map, respectively, disregarding
whether the map is empty or not.

Closes gh-31156
2023-09-08 16:21:39 +02:00
Juergen Hoeller
994bbec0c3 Polishing 2023-08-23 18:57:17 +02:00
Juergen Hoeller
afb378a59f Consistently throw ParseException instead of IllegalStateException
Closes gh-31097
2023-08-23 18:57:12 +02:00
Sébastien Deleuze
a4fc7d3c11 Optimize ClassUtils#getMostSpecificMethod
This commit optimizes ClassUtils#getMostSpecificMethod which is
a method frequently invoked in typical Spring applications.

It refines ClassUtils#isOverridable by considering static and
final modifiers as non overridable and optimizes its implementation.

Closes gh-31100
2023-08-23 18:16:49 +02:00
Sam Brannen
88c3a788f3 Update copyright headers 2023-08-21 15:12:54 +02:00
Sam Brannen
d7ac89ecc9 Revise contribution
Beginning with Java 16, inner classes may contain static members. We
therefore need to search for @DynamicPropertySource methods in the
current class after searching enclosing classes so that a local
@DynamicPropertySource method can override properties registered in an
enclosing class.

However, since Spring Framework 5.3.x is built using Java 8, this
commit removes DynamicPropertySourceOverridesEnclosingClassTests since
it declares a static method in a @Nested (inner) test class, which
results in a compiler error on Java 8.

See https://bugs.openjdk.org/browse/JDK-8254321
See gh-31085
2023-08-21 15:06:00 +02:00
Yanming Zhou
9894174960 Allow overriding dynamic property from enclosing class in nested test class
Prior to this commit, a dynamic property registered via a
@DynamicPropertySource method in a @Nested test class was not able to
override a property registered via a @DynamicPropertySource method in
the enclosing class.

See gh-26091
Closes gh-31083
2023-08-21 14:52:58 +02:00
Juergen Hoeller
493f75e892 Optimize whitespace checks in StringUtils (as far as possible on JDK 8)
Closes gh-31067
2023-08-18 11:40:19 +02:00
Juergen Hoeller
df066d8190 Fix accidental javadoc references to jakarta packages 2023-08-16 13:03:23 +02:00
Juergen Hoeller
5f7a6a0f38 Align validation metadata handling in PayloadMethodArgumentResolver
Reuses ValidationAnnotationUtils which is slightly optimized for the detection of Spring's Validated annotation now, also to the benefit of common web scenarios.

Closes gh-21852

(cherry picked from commit c7269feeaa)
2023-08-16 13:02:31 +02:00
Juergen Hoeller
4326c53222 Polishing
(cherry picked from commit 2ce75dc415)
2023-08-14 20:02:50 +02:00
Juergen Hoeller
3da7a35a91 Test factory-bean/method placeholders as well
See gh-20189

(cherry picked from commit 8b3ddeed05)
2023-08-14 19:41:48 +02:00
Juergen Hoeller
b9be40ccd2 Add registerReactiveTypeOverride method to ReactiveAdapterRegistry
Closes gh-31047

(cherry picked from commit 389238f622)
2023-08-14 15:18:56 +02:00
Juergen Hoeller
f7d4bd176e Explicit note on connection pool deadlock with REQUIRES_NEW
Closes gh-26250
2023-08-12 14:59:32 +02:00
Juergen Hoeller
2b48254268 Use extracted attributes instead of annotation access
See gh-31034

(cherry picked from commit d781f299c0)
2023-08-12 11:38:50 +02:00
Juergen Hoeller
bb46b31925 Find TransactionalEventListener annotation on target method
Closes gh-31034

(cherry picked from commit 6fc4898a1b)
2023-08-12 11:38:41 +02:00
Juergen Hoeller
0c275107ea Cancel without interruption of currently running tasks
Leave potential interruption up to scheduler shutdown.

Closes gh-31019

(cherry picked from commit 6fc5a78252)
2023-08-10 00:08:39 +02:00
Juergen Hoeller
9931f442e4 Polishing
(cherry picked from commit 2aae0a4e0c)
2023-08-07 15:14:06 +02:00
Juergen Hoeller
fc085e8663 Reinstate Introspector.flushFromCaches() call for JDK ClassInfo cache
Closes gh-27781
2023-08-07 15:07:33 +02:00
Juergen Hoeller
9d7154901f Polishing
(cherry picked from commit 6e5af9dccb)
2023-08-06 14:50:24 +02:00
Juergen Hoeller
24893d038f Polishing 2023-08-04 10:35:51 +02:00
Juergen Hoeller
b9482375b7 Sort multiple @Autowired methods on same bean class via ASM
Closes gh-30359

(cherry picked from commit 7e6612a920)
2023-08-04 01:31:49 +02:00
Juergen Hoeller
ad61fb75da Polishing 2023-08-02 01:24:11 +02:00
Juergen Hoeller
c5aa7830bc Polishing
(cherry picked from commit abbea39855)
2023-07-27 21:58:22 +02:00
Juergen Hoeller
14c8c9168c Polishing 2023-07-26 14:02:05 +02:00
Juergen Hoeller
23eb0e3128 Polishing
(cherry picked from commit bbde68c49e)
2023-07-25 19:58:12 +02:00
Juergen Hoeller
840bd574db Polishing
(cherry picked from commit fdf1418dfb)
2023-07-24 11:40:59 +02:00
Juergen Hoeller
6dea580145 Clarify DataAccessException/ScriptException declarations for R2DBC
Closes gh-30932

(cherry picked from commit 5bcf5c6f7c)
2023-07-24 11:35:23 +02:00
Juergen Hoeller
d1efc891db Upgrade to Netty 4.1.95 2023-07-22 00:43:26 +02:00
Juergen Hoeller
c9849d6972 Polishing
(cherry picked from commit 3a9e0ea8a7)
2023-07-22 00:43:09 +02:00
Juergen Hoeller
790abeda1c Polishing 2023-07-21 20:40:06 +02:00
Juergen Hoeller
340b32a3cb Polishing 2023-07-19 23:31:38 +02:00
Juergen Hoeller
a7b7466274 Polishing 2023-07-19 01:17:25 +02:00
Juergen Hoeller
3a8c0dbd8a Decouple exception messages for sync=true from @Cacheable
(cherry picked from commit bbcc788f60)
2023-07-18 22:12:58 +02:00
Juergen Hoeller
b387d9bf10 MethodIntrospector handles overriding bridge method correctly
Closes gh-30906

(cherry picked from commit 616f728afa)
2023-07-18 13:27:15 +02:00
Juergen Hoeller
0f33f79c05 Avoid synchronization for shortcut re-resolution
See gh-30883

(cherry picked from commit 161a717639)
2023-07-16 16:26:37 +02:00
Juergen Hoeller
ef65429823 Polishing
(cherry picked from commit 3a278cc66d)
2023-07-15 14:38:30 +02:00
Juergen Hoeller
0b4b313bae Cache DependencyDescriptor per autowired constructor argument
Aligned with shortcut handling in AutowiredAnnotationBeanPostProcessor.
Includes minor MethodInvoker optimization for pre-resolved targetClass.

Closes gh-30883

(cherry picked from commit 6183f06846)
2023-07-15 14:38:24 +02:00
Juergen Hoeller
6879be7508 Explicit hints for @PostConstruct methods (preventing deadlocks)
Closes gh-25074
2023-07-14 16:33:22 +02:00
Juergen Hoeller
355fa258bd Polishing 2023-07-14 14:52:15 +02:00
Spring Builds
60337738d8 Next development version (v5.3.30-SNAPSHOT) 2023-07-13 07:54:12 +00:00
Juergen Hoeller
53319381d0 Polishing
(cherry picked from commit c873a597c7)
2023-07-12 19:25:26 +02:00
Juergen Hoeller
e1e7fa489b Upgrade to Reactor 2020.0.34 (and Tomcat 9.0.78)
Closes gh-30873
2023-07-12 09:41:42 +02:00
Brian Clozel
e1351a5cb5 Update OS version in CI image 2023-07-12 08:28:18 +02:00
Juergen Hoeller
ac94d2bd54 Polishing
(cherry picked from commit f19433f2d8)
2023-07-11 18:40:40 +02:00
Juergen Hoeller
16fd70ae35 Avoid illegal reflective access in ContextOverridingClassLoader
Closes gh-22791

(cherry picked from commit 0b02a5e073)
2023-07-11 18:36:19 +02:00
Juergen Hoeller
c1bf09952b Improve diagnostics for LinkageError in case of ClassLoader mismatch
Closes gh-25940
2023-07-11 18:36:12 +02:00
Juergen Hoeller
9e7ee0cb8e Deprecate setAllowResultAccessAfterCompletion and document it as broken
Closes gh-26557
2023-07-11 18:36:02 +02:00
rstoyanchev
1cd994d3a8 Encapsulate full path initialization 2023-07-11 11:45:23 +01:00
Juergen Hoeller
3d28c024c5 Handle JDBC warnings in case of a statement exception as well
Closes gh-23106

(cherry picked from commit 3b899fe7e2)
2023-07-10 17:25:05 +02:00