commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-dbcp git commit: Add @SuppressWarnings and format nits.
Date Fri, 08 Jun 2018 21:07:03 GMT
Repository: commons-dbcp
Updated Branches:
  refs/heads/master 83420394a -> f61244c48


Add @SuppressWarnings and format nits.

Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/f61244c4
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/f61244c4
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/f61244c4

Branch: refs/heads/master
Commit: f61244c48d22b86a9c6de16fc4805f10d8d4777b
Parents: 8342039
Author: Gary Gregory <garydgregory@gmail.com>
Authored: Fri Jun 8 15:07:00 2018 -0600
Committer: Gary Gregory <garydgregory@gmail.com>
Committed: Fri Jun 8 15:07:00 2018 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/PoolingConnection.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/f61244c4/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
index 1841beb..8f72b31 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
@@ -273,17 +273,17 @@ public class PoolingConnection extends DelegatingConnection<Connection>
      * @param key the key for the {@link PreparedStatement} to be created
      * @see #createKey(String, int, int, StatementType)
      */
+    @SuppressWarnings("resource")
     @Override
     public PooledObject<DelegatingPreparedStatement> makeObject(final PStmtKey key)
             throws Exception {
-        if(null == key) {
+        if (null == key) {
             throw new IllegalArgumentException("Prepared statement key is null or invalid.");
         }
         if (key.getStmtType() == StatementType.PREPARED_STATEMENT ) {
             final PreparedStatement statement = (PreparedStatement) key.createStatement(getDelegate());
             @SuppressWarnings({"rawtypes", "unchecked"}) // Unable to find way to avoid this
-            final
-            PoolablePreparedStatement pps = new PoolablePreparedStatement(statement, key,
_pstmtPool, this);
+            final PoolablePreparedStatement pps = new PoolablePreparedStatement(statement,
key, _pstmtPool, this);
             return new DefaultPooledObject<DelegatingPreparedStatement>(pps);
         }
         final CallableStatement statement = (CallableStatement) key.createStatement(getDelegate());


Mime
View raw message