mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish DataSourceBuilder.derivedFrom()
Fix duplication accidentally introduced in commit
fa43e1f378
.
See gh-31928
This commit is contained in:
parent
bdebdb5cc2
commit
c9c435cdae
@ -238,18 +238,6 @@ public final class DataSourceBuilder<T extends DataSource> {
|
|||||||
throw new IllegalStateException("Unable to unwrap embedded database", ex);
|
throw new IllegalStateException("Unable to unwrap embedded database", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
while (dataSource.isWrapperFor(DataSource.class)) {
|
|
||||||
DataSource unwrapped = dataSource.unwrap(DataSource.class);
|
|
||||||
if (unwrapped == dataSource) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
dataSource = unwrapped;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (SQLException ex) {
|
|
||||||
// Try to continue with the existing, potentially still wrapped, DataSource
|
|
||||||
}
|
|
||||||
return new DataSourceBuilder<>(unwrap(dataSource));
|
return new DataSourceBuilder<>(unwrap(dataSource));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user