Polish "Honor a wrapper's unwrap when resolving the root DataSource"

See gh-51410
This commit is contained in:
Stéphane Nicoll
2026-08-24 10:41:17 +02:00
parent 5eb30621db
commit d5cec292dc
2 changed files with 6 additions and 5 deletions
@@ -94,9 +94,10 @@ public final class DataSourceUnwrapper {
}
/**
* Return the root {@link DataSource} by recursively unwrapping all
* {@link org.springframework.jdbc.datasource.DelegatingDataSource delegating}, proxy,
* and {@link java.sql.Wrapper} layers until no further unwrapping is possible.
* Return the root {@link DataSource} by recursively unwrapping
* {@link java.sql.Wrapper},
* {@link org.springframework.jdbc.datasource.DelegatingDataSource delegating}, and
* proxy layers until no further unwrapping is possible.
* @param dataSource the datasource to unwrap
* @return the root {@link DataSource}
* @since 4.1.0
@@ -181,12 +181,12 @@ class DataSourceUnwrapperTests {
private static final class SelfReturningDataSource extends AbstractDataSource {
@Override
public Connection getConnection() throws SQLException {
public Connection getConnection() {
throw new UnsupportedOperationException();
}
@Override
public Connection getConnection(String username, String password) throws SQLException {
public Connection getConnection(String username, String password) {
throw new UnsupportedOperationException();
}