Skip to content

Commit 6db20eb

Browse files
committed
Avoid package import cycles
1 parent 2f12351 commit 6db20eb

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/AbstractEmbeddedDatabaseConfigurer.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
import org.apache.commons.logging.Log;
2626
import org.apache.commons.logging.LogFactory;
2727

28-
import org.springframework.jdbc.support.JdbcUtils;
29-
3028
/**
3129
* Base class for {@link EmbeddedDatabaseConfigurer} implementations
3230
* providing common shutdown behavior through a "SHUTDOWN" statement.
@@ -55,7 +53,17 @@ public void shutdown(DataSource dataSource, String databaseName) {
5553
logger.info("Could not shut down embedded database", ex);
5654
}
5755
finally {
58-
JdbcUtils.closeConnection(con);
56+
if (con != null) {
57+
try {
58+
con.close();
59+
}
60+
catch (SQLException ex) {
61+
logger.debug("Could not close JDBC Connection on shutdown", ex);
62+
}
63+
catch (Throwable ex) {
64+
logger.debug("Unexpected exception on closing JDBC Connection", ex);
65+
}
66+
}
5967
}
6068
}
6169

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/PatternsRequestCondition.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.springframework.util.PathMatcher;
3434
import org.springframework.util.StringUtils;
3535
import org.springframework.web.servlet.HandlerMapping;
36-
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
3736
import org.springframework.web.util.UrlPathHelper;
3837

3938
/**
@@ -91,8 +90,8 @@ public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPa
9190
* @param useSuffixPatternMatch whether to enable matching by suffix (".*")
9291
* @param useTrailingSlashMatch whether to match irrespective of a trailing slash
9392
* @deprecated as of 5.2.4. See class-level note in
94-
* {@link RequestMappingHandlerMapping} on the deprecation of path extension
95-
* config options.
93+
* {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping}
94+
* on the deprecation of path extension config options.
9695
*/
9796
@Deprecated
9897
public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPathHelper,
@@ -110,8 +109,8 @@ public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPa
110109
* @param useTrailingSlashMatch whether to match irrespective of a trailing slash
111110
* @param fileExtensions a list of file extensions to consider for path matching
112111
* @deprecated as of 5.2.4. See class-level note in
113-
* {@link RequestMappingHandlerMapping} on the deprecation of path extension
114-
* config options.
112+
* {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping}
113+
* on the deprecation of path extension config options.
115114
*/
116115
@Deprecated
117116
public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPathHelper,

0 commit comments

Comments
 (0)