Commit Graph

179 Commits

Author SHA1 Message Date
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 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
Juergen Hoeller 1e75041b00 Consistent references to scalar values vs Parameter objects
See gh-27282
2023-08-16 11:00:17 +02:00
Juergen Hoeller 0b99872704 Support for binding values from a source Map
See gh-27282
2023-08-16 10:55:26 +02:00
Juergen Hoeller b8b3e6d20c Merge branch '6.0.x'
# Conflicts:
#	spring-r2dbc/src/main/java/org/springframework/r2dbc/core/DatabaseClient.java
2023-08-15 23:52:44 +02:00
Juergen Hoeller 08bc7ed8f0 Polishing 2023-08-15 23:51:41 +02:00
Juergen Hoeller ae3bc378d6 Support for parameter/result records and beans on DatabaseClient
Includes a revision of BeanProperty/DataClassRowMapper with exclusively constructor-based configuration and without JDBC-inherited legacy settings.

Closes gh-27282
Closes gh-26021
2023-08-15 22:42:45 +02:00
Juergen Hoeller cf75a09011 Polishing 2023-08-14 19:39:19 +02:00
Juergen Hoeller 6e5af9dccb Polishing 2023-08-06 14:25:39 +02:00
Juergen Hoeller 3253d2de89 Introduce TransactionExecutionListener with begin/commit/rollback notifications
Includes ConfigurableTransactionManager interface for listener registration.
Includes additional introspection methods on TransactionExecution interface.
Includes default method declarations on TransactionStatus/SmartTransactionObject.

Closes gh-27479
2023-08-06 14:03:44 +02:00
Juergen Hoeller d250a5155a Consistent dependency declarations 2023-08-02 00:56:50 +02:00
Juergen Hoeller ae279eaced Polishing 2023-08-01 23:52:48 +02:00