File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
spring-test/src/main/java/org/springframework/test/context/jdbc Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2022 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -340,8 +340,8 @@ private DataSource getDataSourceFromTransactionManager(PlatformTransactionManage
340
340
try {
341
341
Method getDataSourceMethod = transactionManager .getClass ().getMethod ("getDataSource" );
342
342
Object obj = ReflectionUtils .invokeMethod (getDataSourceMethod , transactionManager );
343
- if (obj instanceof DataSource ) {
344
- return ( DataSource ) obj ;
343
+ if (obj instanceof DataSource dataSource ) {
344
+ return dataSource ;
345
345
}
346
346
}
347
347
catch (Exception ex ) {
You can’t perform that action at this time.
0 commit comments