Sam Brannen
39ff8e46ab
Use String#replace instead of String#replaceAll in tests
...
See gh-36678
2026-05-03 14:36:23 +02:00
Sam Brannen
8566e7bf55
Favor Class#getTypeName over ClassUtils#getQualifiedName where feasible
2026-04-08 13:27:52 +02:00
Juergen Hoeller
6cea397bd8
Consistent handling of early setCatalog/setSchema/setHoldability calls
...
Closes gh-36527
Closes gh-36528
2026-03-24 23:40:43 +01:00
Juergen Hoeller
de562deab0
Recognize error code 149 as deadlock loser (MySQL Galera)
...
Closes gh-36499
2026-03-21 12:04:00 +01:00
Sam Brannen
9e6504b05a
Remove unnecessary parentheses in assertThat() arguments
...
Search: assertThat\(\(\s*((?:[^()]+|\([^()]*\))+)\s*\)\)(\s*\..+)
Replace: assertThat($1)$2
See gh-36504
2026-03-20 10:54:31 +01:00
Sam Brannen
a40ec44cb7
Convert assertThat(x instanceof X).isTrue() to assertThat(x).isInstanceOf()
...
Search: assertThat\((.+?) instanceof (.+?)\)(.*?)\.isTrue\(\)
Replace: assertThat($1)$3.isInstanceOf($2.class)
See gh-36504
2026-03-20 10:54:23 +01:00
Sam Brannen
4357bbd31b
Convert assertThat(!x).isTrue() to assertThat(x).isFalse()
...
Search: assertThat\(\!(.+?)\)(.*?)\.isTrue\(\)
Replace: assertThat($1)$2.isFalse()
See gh-36504
2026-03-20 10:54:13 +01:00
Sam Brannen
4548f1ec66
Inline conditions in assertThat() statements
...
Search: assertThat\(conditions?[0-9]?\)
See gh-36504
2026-03-20 10:53:54 +01:00
Sam Brannen
1256307c83
Enable SpringJUnit5 Checkstyle rule
...
See gh-36496
Closes gh-36496
2026-03-18 18:38:43 +01:00
Sam Brannen
4c14abf0cd
Remove obsolete "test" prefix from test method names
...
Although this commit also changes the visibility of some test methods
to package-private, the remainder of that task will be addressed in
conjunction with gh-36496.
Closes gh-36495
2026-03-18 18:16:15 +01:00
Sam Brannen
5eb0e99d58
Fix common typos and grammatical mistakes
...
Closes gh-36471
2026-03-15 17:05:29 +01:00
Manu Sridharan
8a1a9d2ab2
Fix nullability annotation in JdbcTemplate
...
Signed-off-by: Manu Sridharan <msridhar@gmail.com >
2026-02-08 18:13:57 +01:00
qwding
149397ed10
Optimize NamedParameterUtils#buildValueArray by lazily fetching SqlParameter
...
This PR optimizes the performance of NamedParameterUtils#buildValueArray by deferring the call to findParameter(declaredParams, paramName, i).
Changes: In the original implementation, findParameter was called for every parameter in the loop, regardless of whether the paramValue retrieved from paramSource was already an instance of SqlParameterValue.
Since findParameter involves iterating through the declaredParams list (or performing lookups), skipping this call when paramValue instanceof SqlParameterValue is true reduces unnecessary CPU cycles and memory access, especially for queries with a large number of parameters or long declaredParams lists.
Signed-off-by: qwding <761945125@qq.com >
2026-01-30 11:59:43 +01:00
Sam Brannen
799a520c35
Consistently refer to "an SQL" statement, type, etc.
...
Aside from the three classes I modified, we already do this
consistently across the code base and in the reference manual.
2026-01-28 18:02:34 +01:00
Juergen Hoeller
5d33de943b
Polishing
2026-01-28 17:09:02 +01:00
Juergen Hoeller
7da65fe4fc
Support -1 for undetermined length in SqlBinaryValue/SqlCharacterValue
...
Closes gh-36219
2026-01-28 17:08:40 +01:00
Brian Clozel
ec6b7730a2
Polishing contribution
...
Closes gh-36032
2025-12-17 12:35:30 +01:00
jher235
fc29d88778
Use StringBuilder in JdbcTemplate for batch updates
...
See gh-36032
Signed-off-by: jher235 <tim668666@gmail.com >
2025-12-17 12:35:30 +01:00
Juergen Hoeller
ab33000750
Do not keep target connection after failed settings
...
Includes aligned setReadOnly exception suppression.
Closes gh-35980
2025-12-09 12:59:27 +01:00
Juergen Hoeller
f58d0f6aae
Consistent namespace element declarations
2025-11-26 15:09:05 +01:00
Juergen Hoeller
c1b6bfb681
Expose non-existent resources at the end of the sorted result
...
Closes gh-35895
2025-11-26 15:08:24 +01:00
Juergen Hoeller
35b8fbf901
Remove javadoc references to deprecated PropertiesBeanDefinitionReader
...
Closes gh-35836
2025-11-19 16:18:56 +01:00
Sébastien Deleuze
23f0cfb925
Fix JdbcOperations Kotlin extensions
...
This commit updates JdbcOperationsExtensions.kt to:
- Properly use the spread operator for invoking Java methods with
a varargs parameter
- Align JdbcOperationsExtensions return values nullability
with the Java API (breaking change)
- Use varargs where Java counterpart does (breaking change, undo some
changes from gh-34668)
- Use nullable args instead of non-nullable ones
Closes gh-35846
2025-11-19 15:55:00 +01:00
Sébastien Deleuze
6b8552b4c1
Refine ParameterizedPreparedStatementSetter nullability
...
This commit refines ParameterizedPreparedStatementSetter nullability
to ensure consistency with JdbcTemplate#batchUpdate.
Closes gh-35749
2025-11-17 10:31:56 +01:00
Juergen Hoeller
2b526efe65
Polishing
2025-11-02 17:38:50 +01:00
Juergen Hoeller
a8410aa601
Merge branch '6.2.x'
...
# Conflicts:
# spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java
# spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java
2025-11-02 17:37:13 +01:00
Juergen Hoeller
a33027703d
Preserve Connection readOnly state for defaultReadOnly DataSource
...
Includes DataSourceTransactionManagerTests alignment with main branch.
Closes gh-35743
2025-11-02 17:28:12 +01:00
Sam Brannen
00e1429378
Polish SQLErrorCodeSQLExceptionTranslatorTests
2025-10-30 16:13:38 +01:00
Sam Brannen
2d3c2e3feb
Revise contribution
...
See gh-35380
2025-10-30 16:13:38 +01:00
Dmytro Nosan
a41af448ec
Ensure SingletonSupplier is singleton even if singletonInstance is null
...
Previously, SingletonSupplier stored "null" in singletonInstance when
the supplied instance was "null". On subsequent get() calls, this was
treated as "uninitialized" and triggered another attempt to obtain an
instance from the Supplier.
This commit ensures that a "null" returned from the instanceSupplier or
defaultSupplier is handled correctly, so that subsequent calls to get()
return "null" consistently instead of repeatedly invoking the Supplier.
Closes gh-35380
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com >
2025-10-30 16:13:13 +01:00
Juergen Hoeller
34562d3145
Merge branch '6.2.x'
2025-10-30 15:32:36 +01:00
Juergen Hoeller
5471961f06
Restore exposure of original BatchUpdateException as root cause
...
Closes gh-35717
See gh-35547
2025-10-30 14:59:00 +01:00
Juergen Hoeller
92a186b44b
Merge branch '6.2.x'
2025-10-28 20:39:56 +01:00
Park Juhyeong
4b7b280ac3
Optimize resource URL resolution in SortedResourcesFactoryBean
...
Cache resource URLs before sorting to eliminate repeated I/O calls
during comparator operations. The previous implementation called
getURL() multiple times per resource during sorting (O(n log n)
calls), and silently swallowed IOExceptions by returning 0,
potentially causing unstable sort results.
This change:
- Caches URLs once per resource before sorting (O(n) I/O calls)
- Removes unnecessary ArrayList conversions
- Provides clear exception handling with context
- Improves performance by ~70% for typical use cases
Signed-off-by: Park Juhyeong <wngud5957@naver.com >
2025-10-28 20:30:33 +01:00
Sébastien Deleuze
694224f1a6
Remove outdated Spring version mentions
...
Close gh-35696
2025-10-28 13:58:09 +01:00
Sam Brannen
bccfbfd630
Fix previous commit for 6.2.x compatibility
...
See gh-35674
2025-10-21 15:37:35 +02:00
Brian Clozel
5923d36de3
Merge branch '6.2.x'
2025-10-21 13:50:25 +02:00
Brian Clozel
506b76032f
Add missing reflection hints for JdbcUtils
...
This commit adds the missing reflection hints for `JdbcUtils`, as this
class reflects on `java.sql.Types` public fields.
Fixes gh-35674
2025-10-21 13:50:13 +02:00
Sam Brannen
ea27415b7b
Merge branch '6.2.x'
2025-10-13 15:12:50 +02:00
Juergen Hoeller
6c5de48059
Ignore SQL state 3B001 in HSQLDB exception message as well
...
Closes gh-35618
See gh-35564
2025-10-13 15:10:20 +02:00
Sam Brannen
c2ef11e1fc
Remove test prefixes and avoid warnings in JDBC and TX tests
2025-10-13 14:48:03 +02:00
Juergen Hoeller
edc14c2e15
Merge branch '6.2.x'
...
# Conflicts:
# spring-context-indexer/src/main/java/org/springframework/context/index/processor/StandardStereotypesProvider.java
# spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java
# spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java
2025-10-09 20:37:49 +02:00
Juergen Hoeller
c2a66e723f
Polishing
2025-10-09 20:34:03 +02:00
Juergen Hoeller
2ee34a5632
Add MySQLTableMetaDataProvider for correct generated-keys support
...
Closes gh-35593
2025-10-09 20:30:25 +02:00
Juergen Hoeller
54b43d4a88
Merge branch '6.2.x'
...
# Conflicts:
# spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLExceptionSubclassTranslator.java
# spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLStateSQLExceptionTranslator.java
2025-10-03 14:54:04 +02:00
Juergen Hoeller
332953c9a4
Align BatchUpdateException handling among SQLExceptionTranslator variants
...
Closes gh-35547
2025-10-03 14:51:15 +02:00
Juergen Hoeller
7089bdcc3a
Merge branch '6.2.x'
...
# Conflicts:
# spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java
2025-10-02 13:17:45 +02:00
Juergen Hoeller
d484e4f3ff
Ignore SQL state 3B001 in releaseSavepoint (for HSQLDB)
...
Closes gh-35564
2025-10-02 13:01:30 +02:00
Sébastien Deleuze
da0a36bfd6
Upgrade to NullAway 0.12.10 and refine nullability
...
Closes gh-35492
2025-09-17 15:17:23 +02:00
Juergen Hoeller
b8f71b2321
Add DataFieldMaxValueIncrementer for SQLite (migrated from Spring Batch)
...
Closes gh-35440
2025-09-08 17:03:18 +02:00