This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push: new ca71ec06 Simplify implementation ca71ec06 is described below commit ca71ec061fc3e73106e6e11dbac76a64711bb18f Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Sat Jul 9 17:42:53 2022 -0400 Simplify implementation --- .../java/org/apache/commons/dbcp2/PoolingConnection.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java index 085b9191..a2fb4a25 100644 --- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java +++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java @@ -297,23 +297,19 @@ public class PoolingConnection extends DelegatingConnection<Connection> } private String getCatalogOrNull() { - String catalog = null; try { - catalog = getCatalog(); + return getCatalog(); } catch (final SQLException ignored) { - // Ignored + return null; } - return catalog; } private String getSchemaOrNull() { - String schema = null; try { - schema = getSchema(); + return getSchema(); } catch (final SQLException ignored) { - // Ignored + return null; } - return schema; } /**