Skip to content

Commit a21b5f5

Browse files
committed
Merge pull request spring-projects#31928 from izeye
* pr/31928: Polish DataSourceBuilder.derivedFrom() Closes spring-projectsgh-31928
2 parents bdebdb5 + c9c435c commit a21b5f5

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java

-12
Original file line numberDiff line numberDiff line change
@@ -238,18 +238,6 @@ public static DataSourceBuilder<?> derivedFrom(DataSource dataSource) {
238238
throw new IllegalStateException("Unable to unwrap embedded database", ex);
239239
}
240240
}
241-
try {
242-
while (dataSource.isWrapperFor(DataSource.class)) {
243-
DataSource unwrapped = dataSource.unwrap(DataSource.class);
244-
if (unwrapped == dataSource) {
245-
break;
246-
}
247-
dataSource = unwrapped;
248-
}
249-
}
250-
catch (SQLException ex) {
251-
// Try to continue with the existing, potentially still wrapped, DataSource
252-
}
253241
return new DataSourceBuilder<>(unwrap(dataSource));
254242
}
255243

0 commit comments

Comments
 (0)