diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java index e57712d3780..7ba507e6bdc 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java @@ -238,18 +238,6 @@ public final class DataSourceBuilder { 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)); }