Skip to content

Commit

Permalink
Avoid package import cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Feb 25, 2020
1 parent 2f12351 commit 6db20eb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.jdbc.support.JdbcUtils;

/**
* Base class for {@link EmbeddedDatabaseConfigurer} implementations
* providing common shutdown behavior through a "SHUTDOWN" statement.
Expand Down Expand Up @@ -55,7 +53,17 @@ public void shutdown(DataSource dataSource, String databaseName) {
logger.info("Could not shut down embedded database", ex);
}
finally {
JdbcUtils.closeConnection(con);
if (con != null) {
try {
con.close();
}
catch (SQLException ex) {
logger.debug("Could not close JDBC Connection on shutdown", ex);
}
catch (Throwable ex) {
logger.debug("Unexpected exception on closing JDBC Connection", ex);
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.springframework.util.PathMatcher;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
import org.springframework.web.util.UrlPathHelper;

/**
Expand Down Expand Up @@ -91,8 +90,8 @@ public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPa
* @param useSuffixPatternMatch whether to enable matching by suffix (".*")
* @param useTrailingSlashMatch whether to match irrespective of a trailing slash
* @deprecated as of 5.2.4. See class-level note in
* {@link RequestMappingHandlerMapping} on the deprecation of path extension
* config options.
* {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping}
* on the deprecation of path extension config options.
*/
@Deprecated
public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPathHelper,
Expand All @@ -110,8 +109,8 @@ public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPa
* @param useTrailingSlashMatch whether to match irrespective of a trailing slash
* @param fileExtensions a list of file extensions to consider for path matching
* @deprecated as of 5.2.4. See class-level note in
* {@link RequestMappingHandlerMapping} on the deprecation of path extension
* config options.
* {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping}
* on the deprecation of path extension config options.
*/
@Deprecated
public PatternsRequestCondition(String[] patterns, @Nullable UrlPathHelper urlPathHelper,
Expand Down

0 comments on commit 6db20eb

Please sign in to comment.