Commit Graph

181 Commits

Author SHA1 Message Date
Yanming Zhou
8941e2876e Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
2024-09-26 14:11:17 +02:00
Tran Ngoc Nhan
c85050eb43 Consistently use CharSequence.isEmpty() for emptiness checks
Closes gh-33577
2024-09-23 17:10:21 +02:00
Brian Clozel
38453910cd Add DatabaseClient bind variant for list of parameters
Prior to this commit, the `DatabaseClient` interface would allow batch
operations for binding parameters by their names and values. Positional
parameters did not have such equivalent.

This commit adds a new `bindValues(List<?>)` method variant for adding
multiple positional arguments in a single call and avoiding allocation
overhead when the parameters count is large.

Closes gh-33274
2024-07-29 14:07:15 +02:00
Sébastien Deleuze
12272d6e41 Remove unneeded @SuppressWarnings("NullAway")
Closes gh-32542
2024-05-06 18:28:54 +02:00
Sébastien Deleuze
5b660da52d Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in:
 - spring-jdbc
 - spring-r2dbc
 - spring-orm
 - spring-beans
 - spring-aop

See gh-32475
2024-03-26 09:59:30 +01:00
Sébastien Deleuze
3b4f8dbb8e Merge branch '6.1.x' 2024-03-26 09:47:09 +01: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
Sam Brannen
6461eec582 Revise contribution
Closes gh-32380
2024-03-06 11:49:21 +01:00
Sam Brannen
eb8492d597 Spring cleaning: avoid use of Iterator for Iterable 2024-02-23 12:21:12 +01:00
Sam Brannen
bc2895a30b Support backticks for quoted identifiers in spring-r2dbc
NamedParameterUtils in spring-r2dbc now supports MySQL-style backticks
for quoted identifiers for consistency with spring-jdbc.

See gh-31944
Closes gh-32285
2024-02-17 16:05:40 +01:00
Sam Brannen
d86af57e0f Polishing 2024-02-17 16:00:58 +01:00
Juergen Hoeller
3aae7a66e6 Polishing 2024-02-16 22:27:09 +01:00
Stéphane Nicoll
1f2d29ee08 Polish 2024-01-08 17:12:33 +01:00
Stéphane Nicoll
2d3b02a89d Polish 2024-01-08 11:48:08 +01:00
Yanming Zhou
7b16ef90f1 Replace assertThat(x.equals(y)) with assertThat(x).isEqualTo(y)
Search for   : assertThat\((.+)\.equals\((\w+)\)\)\.isTrue\(\)
Replace with : assertThat($1).isEqualTo($2)

Search for   : assertThat\((.+)\.equals\((\w+)\)\)\.isFalse\(\)
Replace with : assertThat($1).isNotEqualTo($2)

Closes gh-31763
2023-12-06 09:50:15 +01:00
Sam Brannen
cb60f74556 Stop referring to JDO PersistenceManager in comments 2023-12-04 16:50:53 +01:00
Sam Brannen
d71853f105 Polish contribution
See gh-31531
2023-12-04 16:47:25 +01:00
Yanming Zhou
490b5c77fc Use switch expression where feasible 2023-12-04 15:42:55 +01:00
Juergen Hoeller
2b7a9209b3 Merge branch '6.0.x' 2023-11-14 12:52:25 +01:00
Juergen Hoeller
99327b7db1 Preserve nested square brackets within parameter name
Closes gh-31596
2023-11-14 12:51:19 +01:00
Stéphane Nicoll
f5453cc445 Polish 2023-11-10 16:42:43 +01:00
Sam Brannen
9759bf5964 Merge branch '6.0.x' 2023-11-07 17:13:46 +01:00
Sam Brannen
e778d2e908 Polish duplicate key exception error code support for SAP HANA database for R2DBC
See gh-31554
2023-11-07 17:12:29 +01:00
Sam Brannen
5752e03d97 Polishing 2023-11-07 16:58:21 +01:00
Stéphane Nicoll
c30b3796f2 Merge branch '6.0.x' 2023-11-07 10:37:22 +01:00
Stéphane Nicoll
50e55d5219 Polish "Add SAP HANA duplicate key exception error code"
See gh-31554
2023-11-07 10:33:14 +01:00
Johnny Lim
64e9fcad53 Apply SingleSpaceSeparator Checkstyle module
This commit also fixes its violations.

Closes gh-31469
2023-10-22 14:09:57 +02:00
Sam Brannen
37e6fe5b64 Update copyright headers 2023-10-22 11:28:40 +02:00
Johnny Lim
919faa2ce2 Order modifiers to align with JLS
This commit also applies Checkstyle ModifierOrder to enforce it.

See gh-31368
2023-10-17 16:13:56 +02:00
Juergen Hoeller
2cdc114273 Merge branch '6.0.x' 2023-10-11 16:11:34 +02:00
Juergen Hoeller
86650d1a39 Polishing 2023-10-11 16:10:53 +02:00
Juergen Hoeller
80e82cd43f Do not close transactional Connection in doReleaseConnection
Closes gh-28133
2023-10-11 15:43:02 +02:00
Kai Zander
e8b42c5439 Optimize uses of onErrorResume()
This commit replaces uses of onErrorResume() with
- onErrorMap() in places where onErrorResume() is just used to map to a
  different exception.
- onErrorComplete() where onErrorResume() just maps to Mono.empty().
- onErrorReturn() where onErrorResum() just maps to Mono.just().

Closes gh-31352
2023-10-03 14:42:24 +02:00
Juergen Hoeller
a3e13c8ba8 Merge branch '6.0.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/util/backoff/ExponentialBackOff.java
2023-09-29 15:01:43 +02:00
Juergen Hoeller
407113945d Polishing 2023-09-29 14:58:02 +02:00
Juergen Hoeller
847e8a2b23 Restore auto-commit mode if not done by driver
Closes gh-31268
2023-09-29 14:57:17 +02:00
Sam Brannen
d50ec68ad7 Polish contribution
See gh-31248
2023-09-26 13:49:03 +02:00
Lee Jaeheon
6d2d8a36c2 Introduce initialize() in AbstractRouting[DataSource|ConnectionFactory]
This commit introduces initialize() methods in
AbstractRoutingDataSource and AbstractRoutingConnectionFactory as an
alternative to invoking afterPropertiesSet().

Closes gh-31248
2023-09-26 13:20:11 +02:00
Stéphane Nicoll
f9291214ec Polish "Use singleOrEmpty() instead of buffer()"
See gh-31282
2023-09-26 12:37:28 +02:00
Ronny Perinke
cbfb99fef2 Use singleOrEmpty() instead of buffer()
This commit avoids fetching and buffering results in temporary `List` buffers.

See gh-31282
2023-09-26 12:37:28 +02:00
Stephane Nicoll
01f717375b Introduce ObjectUtils#nullSafeHash(Object... element)
This commit deprecates the various nullSafeHashCode methods taking array
types as they are superseded by Arrays.hashCode now. This means that
the now only remaining nullSafeHashCode method does not trigger a
warning only if the target type is not an array. At the same time, there
are multiple use of this method on several elements, handling the
accumulation of hash codes.

For that reason, this commit also introduces a nullSafeHash that takes
an array of elements. The only difference between Objects.hash is that
this method handles arrays.

The codebase has been reviewed to use any of those two methods when it
is possible.

Closes gh-29051
2023-09-13 15:14:34 +02:00
Juergen Hoeller
3099710087 Merge branch '6.0.x'
# Conflicts:
#	spring-r2dbc/src/main/java/org/springframework/r2dbc/connection/R2dbcTransactionManager.java
#	spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/R2dbcTransactionManagerUnitTests.java
2023-09-11 17:40:11 +02:00
Juergen Hoeller
2880e6fba5 Consistently release savepoint after nested transaction
Closes gh-31133
2023-09-11 17:36:00 +02:00
christophejan
8d4ea72e4e Skip release connection after nested with existing transaction 2023-09-11 14:20:37 +02:00
Sébastien Deleuze
6f38e90048 Merge branch '6.0.x' 2023-09-08 13:08:14 +02:00
Sébastien Deleuze
12a01a680b Document some non-nullable Kotlin extensions can throw NoSuchElementException
Closes gh-31189
2023-09-08 13:07:58 +02:00
Sam Brannen
fad70aa252 Update copyright headers 2023-09-04 14:30:44 +02:00
Sébastien Deleuze
bcf11e8919 Replace Reactive awaitSingle() usages by the Mono variant
Closes gh-31127
2023-08-29 09:49:44 +02:00
Sam Brannen
3dcac0cf80 Clean up / Suppress warnings 2023-08-18 12:46:17 +02:00
Juergen Hoeller
d77595bf2c Merge branch '6.0.x' 2023-08-16 11:00:58 +02:00