You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/06/13 17:28:23 UTC

[01/50] [abbrv] commons-dbcp git commit: Line length 120 and standard formatting.

Repository: commons-dbcp
Updated Branches:
  refs/heads/release f8b218691 -> fb23b1530


Line length 120 and standard formatting.

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

Branch: refs/heads/release
Commit: c432a075e7c1bca79a63eb2a8f9d9ef5495c0e48
Parents: b3f1cc3
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:07:48 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:07:48 2018 -0600

----------------------------------------------------------------------
 .../dbcp2/DelegatingCallableStatement.java      | 1060 +++++++++++++-----
 1 file changed, 773 insertions(+), 287 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/c432a075/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
index 9aed970..ac48ce8 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
@@ -39,359 +39,876 @@ import java.util.Map;
 /**
  * A base delegating implementation of {@link CallableStatement}.
  * <p>
- * All of the methods from the {@link CallableStatement} interface
- * simply call the corresponding method on the "delegate"
- * provided in my constructor.
+ * All of the methods from the {@link CallableStatement} interface simply call the corresponding method on the
+ * "delegate" provided in my constructor.
  * <p>
- * Extends AbandonedTrace to implement Statement tracking and
- * logging of code which created the Statement. Tracking the
- * Statement ensures that the Connection which created it can
- * close any open Statement's on Connection close.
+ * Extends AbandonedTrace to implement Statement tracking and logging of code which created the Statement. Tracking the
+ * Statement ensures that the Connection which created it can close any open Statement's on Connection close.
  *
  * @since 2.0
  */
-public class DelegatingCallableStatement extends DelegatingPreparedStatement
-        implements CallableStatement {
+public class DelegatingCallableStatement extends DelegatingPreparedStatement implements CallableStatement {
 
     /**
-     * Create a wrapper for the Statement which traces this
-     * Statement to the Connection which created it and the
-     * code which created it.
+     * Create a wrapper for the Statement which traces this Statement to the Connection which created it and the code
+     * which created it.
      *
-     * @param c the {@link DelegatingConnection} that created this statement
-     * @param s the {@link CallableStatement} to delegate all calls to
+     * @param c
+     *            the {@link DelegatingConnection} that created this statement
+     * @param s
+     *            the {@link CallableStatement} to delegate all calls to
      */
-    public DelegatingCallableStatement(final DelegatingConnection<?> c,
-                                       final CallableStatement s) {
+    public DelegatingCallableStatement(final DelegatingConnection<?> c, final CallableStatement s) {
         super(c, s);
     }
 
     @Override
-    public void registerOutParameter(final int parameterIndex, final int sqlType) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).registerOutParameter( parameterIndex,  sqlType); } catch (final SQLException e) { handleException(e); } }
+    public void registerOutParameter(final int parameterIndex, final int sqlType) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).registerOutParameter(parameterIndex, sqlType);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void registerOutParameter(final int parameterIndex, final int sqlType, final int scale) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).registerOutParameter( parameterIndex,  sqlType,  scale); } catch (final SQLException e) { handleException(e); } }
+    public void registerOutParameter(final int parameterIndex, final int sqlType, final int scale) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).registerOutParameter(parameterIndex, sqlType, scale);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public boolean wasNull() throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).wasNull(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean wasNull() throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).wasNull();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public String getString(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getString( parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public String getString(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getString(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public boolean getBoolean(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBoolean( parameterIndex); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean getBoolean(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBoolean(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public byte getByte(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getByte( parameterIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public byte getByte(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getByte(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public short getShort(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getShort( parameterIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public short getShort(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getShort(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public int getInt(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getInt( parameterIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getInt(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getInt(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public long getLong(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getLong( parameterIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public long getLong(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getLong(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public float getFloat(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getFloat( parameterIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public float getFloat(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getFloat(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public double getDouble(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getDouble( parameterIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public double getDouble(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getDouble(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     /** @deprecated Use {@link #getBigDecimal(int)} or {@link #getBigDecimal(String)} */
     @Override
     @Deprecated
-    public BigDecimal getBigDecimal(final int parameterIndex, final int scale) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBigDecimal( parameterIndex,  scale); } catch (final SQLException e) { handleException(e); return null; } }
+    public BigDecimal getBigDecimal(final int parameterIndex, final int scale) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBigDecimal(parameterIndex, scale);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public byte[] getBytes(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBytes( parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public byte[] getBytes(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBytes(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getDate( parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getDate(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTime( parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTime(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTimestamp( parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Timestamp getTimestamp(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTimestamp(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Object getObject(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getObject( parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getObject(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public BigDecimal getBigDecimal(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBigDecimal( parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public BigDecimal getBigDecimal(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBigDecimal(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Object getObject(final int i, final Map<String,Class<?>> map) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getObject( i, map); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getObject(i, map);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Ref getRef(final int i) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getRef( i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Ref getRef(final int i) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getRef(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Blob getBlob(final int i) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBlob( i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Blob getBlob(final int i) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBlob(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Clob getClob(final int i) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getClob( i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Clob getClob(final int i) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getClob(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Array getArray(final int i) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getArray( i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Array getArray(final int i) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getArray(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final int parameterIndex, final Calendar cal) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getDate( parameterIndex,  cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final int parameterIndex, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getDate(parameterIndex, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final int parameterIndex, final Calendar cal) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTime( parameterIndex,  cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final int parameterIndex, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTime(parameterIndex, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final int parameterIndex, final Calendar cal) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTimestamp( parameterIndex,  cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Timestamp getTimestamp(final int parameterIndex, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTimestamp(parameterIndex, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public void registerOutParameter(final int paramIndex, final int sqlType, final String typeName) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).registerOutParameter( paramIndex,  sqlType,  typeName); } catch (final SQLException e) { handleException(e); } }
+    public void registerOutParameter(final int paramIndex, final int sqlType, final String typeName)
+            throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).registerOutParameter(paramIndex, sqlType, typeName);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void registerOutParameter(final String parameterName, final int sqlType) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).registerOutParameter(parameterName, sqlType); } catch (final SQLException e) { handleException(e); } }
+    public void registerOutParameter(final String parameterName, final int sqlType) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).registerOutParameter(parameterName, sqlType);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void registerOutParameter(final String parameterName, final int sqlType, final int scale) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).registerOutParameter(parameterName, sqlType, scale); } catch (final SQLException e) { handleException(e); } }
+    public void registerOutParameter(final String parameterName, final int sqlType, final int scale)
+            throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).registerOutParameter(parameterName, sqlType, scale);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void registerOutParameter(final String parameterName, final int sqlType, final String typeName) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).registerOutParameter(parameterName, sqlType, typeName); } catch (final SQLException e) { handleException(e); } }
+    public void registerOutParameter(final String parameterName, final int sqlType, final String typeName)
+            throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).registerOutParameter(parameterName, sqlType, typeName);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public URL getURL(final int parameterIndex) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getURL(parameterIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public URL getURL(final int parameterIndex) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getURL(parameterIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public void setURL(final String parameterName, final URL val) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setURL(parameterName, val); } catch (final SQLException e) { handleException(e); } }
+    public void setURL(final String parameterName, final URL val) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setURL(parameterName, val);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setNull(final String parameterName, final int sqlType) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setNull(parameterName, sqlType); } catch (final SQLException e) { handleException(e); } }
+    public void setNull(final String parameterName, final int sqlType) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setNull(parameterName, sqlType);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setBoolean(final String parameterName, final boolean x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setBoolean(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setBoolean(final String parameterName, final boolean x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setBoolean(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setByte(final String parameterName, final byte x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setByte(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setByte(final String parameterName, final byte x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setByte(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setShort(final String parameterName, final short x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setShort(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setShort(final String parameterName, final short x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setShort(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setInt(final String parameterName, final int x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setInt(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setInt(final String parameterName, final int x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setInt(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setLong(final String parameterName, final long x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setLong(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setLong(final String parameterName, final long x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setLong(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setFloat(final String parameterName, final float x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setFloat(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setFloat(final String parameterName, final float x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setFloat(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setDouble(final String parameterName, final double x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setDouble(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setDouble(final String parameterName, final double x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setDouble(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setBigDecimal(final String parameterName, final BigDecimal x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setBigDecimal(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setBigDecimal(final String parameterName, final BigDecimal x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setBigDecimal(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setString(final String parameterName, final String x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setString(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setString(final String parameterName, final String x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setString(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setBytes(final String parameterName, final byte [] x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setBytes(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setBytes(final String parameterName, final byte[] x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setBytes(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setDate(final String parameterName, final Date x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setDate(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setDate(final String parameterName, final Date x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setDate(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setTime(final String parameterName, final Time x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setTime(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setTime(final String parameterName, final Time x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setTime(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setTimestamp(final String parameterName, final Timestamp x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setTimestamp(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setTimestamp(final String parameterName, final Timestamp x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setTimestamp(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setAsciiStream(final String parameterName, final InputStream x, final int length) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setAsciiStream(parameterName, x, length); } catch (final SQLException e) { handleException(e); } }
+    public void setAsciiStream(final String parameterName, final InputStream x, final int length) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setAsciiStream(parameterName, x, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setBinaryStream(final String parameterName, final InputStream x, final int length) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setBinaryStream(parameterName, x, length); } catch (final SQLException e) { handleException(e); } }
+    public void setBinaryStream(final String parameterName, final InputStream x, final int length) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setBinaryStream(parameterName, x, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setObject(final String parameterName, final Object x, final int targetSqlType, final int scale) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setObject(parameterName, x, targetSqlType, scale); } catch (final SQLException e) { handleException(e); } }
+    public void setObject(final String parameterName, final Object x, final int targetSqlType, final int scale)
+            throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setObject(parameterName, x, targetSqlType, scale);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setObject(final String parameterName, final Object x, final int targetSqlType) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setObject(parameterName, x, targetSqlType); } catch (final SQLException e) { handleException(e); } }
+    public void setObject(final String parameterName, final Object x, final int targetSqlType) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setObject(parameterName, x, targetSqlType);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setObject(final String parameterName, final Object x) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setObject(parameterName, x); } catch (final SQLException e) { handleException(e); } }
+    public void setObject(final String parameterName, final Object x) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setObject(parameterName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setCharacterStream(final String parameterName, final Reader reader, final int length) throws SQLException
-    { checkOpen(); ((CallableStatement)getDelegate()).setCharacterStream(parameterName, reader, length); }
+    public void setCharacterStream(final String parameterName, final Reader reader, final int length)
+            throws SQLException {
+        checkOpen();
+        ((CallableStatement) getDelegate()).setCharacterStream(parameterName, reader, length);
+    }
 
     @Override
-    public void setDate(final String parameterName, final Date x, final Calendar cal) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setDate(parameterName, x, cal); } catch (final SQLException e) { handleException(e); } }
+    public void setDate(final String parameterName, final Date x, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setDate(parameterName, x, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setTime(final String parameterName, final Time x, final Calendar cal) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setTime(parameterName, x, cal); } catch (final SQLException e) { handleException(e); } }
+    public void setTime(final String parameterName, final Time x, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setTime(parameterName, x, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setTimestamp(final String parameterName, final Timestamp x, final Calendar cal) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setTimestamp(parameterName, x, cal); } catch (final SQLException e) { handleException(e); } }
+    public void setTimestamp(final String parameterName, final Timestamp x, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setTimestamp(parameterName, x, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void setNull(final String parameterName, final int sqlType, final String typeName) throws SQLException
-    { checkOpen(); try { ((CallableStatement)getDelegate()).setNull(parameterName, sqlType, typeName); } catch (final SQLException e) { handleException(e); } }
+    public void setNull(final String parameterName, final int sqlType, final String typeName) throws SQLException {
+        checkOpen();
+        try {
+            ((CallableStatement) getDelegate()).setNull(parameterName, sqlType, typeName);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public String getString(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getString(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public String getString(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getString(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public boolean getBoolean(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBoolean(parameterName); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean getBoolean(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBoolean(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public byte getByte(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getByte(parameterName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public byte getByte(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getByte(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public short getShort(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getShort(parameterName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public short getShort(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getShort(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public int getInt(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getInt(parameterName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getInt(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getInt(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public long getLong(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getLong(parameterName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public long getLong(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getLong(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public float getFloat(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getFloat(parameterName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public float getFloat(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getFloat(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public double getDouble(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getDouble(parameterName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public double getDouble(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getDouble(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public byte[] getBytes(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBytes(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public byte[] getBytes(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBytes(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getDate(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getDate(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTime(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTime(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTimestamp(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Timestamp getTimestamp(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTimestamp(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Object getObject(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getObject(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getObject(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public BigDecimal getBigDecimal(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBigDecimal(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public BigDecimal getBigDecimal(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBigDecimal(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Object getObject(final String parameterName, final Map<String,Class<?>> map) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getObject(parameterName, map); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final String parameterName, final Map<String, Class<?>> map) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getObject(parameterName, map);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Ref getRef(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getRef(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Ref getRef(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getRef(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Blob getBlob(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getBlob(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Blob getBlob(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getBlob(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Clob getClob(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getClob(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Clob getClob(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getClob(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Array getArray(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getArray(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Array getArray(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getArray(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final String parameterName, final Calendar cal) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getDate(parameterName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final String parameterName, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getDate(parameterName, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final String parameterName, final Calendar cal) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTime(parameterName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final String parameterName, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTime(parameterName, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final String parameterName, final Calendar cal) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getTimestamp(parameterName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Timestamp getTimestamp(final String parameterName, final Calendar cal) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getTimestamp(parameterName, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public URL getURL(final String parameterName) throws SQLException
-    { checkOpen(); try { return ((CallableStatement)getDelegate()).getURL(parameterName); } catch (final SQLException e) { handleException(e); return null; } }
-
+    public URL getURL(final String parameterName) throws SQLException {
+        checkOpen();
+        try {
+            return ((CallableStatement) getDelegate()).getURL(parameterName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
     public RowId getRowId(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getRowId(parameterIndex);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getRowId(parameterIndex);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -401,9 +918,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public RowId getRowId(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getRowId(parameterName);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getRowId(parameterName);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -413,9 +929,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setRowId(final String parameterName, final RowId value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setRowId(parameterName, value);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setRowId(parameterName, value);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -424,20 +939,19 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setNString(final String parameterName, final String value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setNString(parameterName, value);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setNString(parameterName, value);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setNCharacterStream(final String parameterName, final Reader reader, final long length) throws SQLException {
+    public void setNCharacterStream(final String parameterName, final Reader reader, final long length)
+            throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setNCharacterStream(parameterName, reader, length);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setNCharacterStream(parameterName, reader, length);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -446,9 +960,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setNClob(final String parameterName, final NClob value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setNClob(parameterName, value);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setNClob(parameterName, value);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -457,20 +970,19 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setClob(final String parameterName, final Reader reader, final long length) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setClob(parameterName, reader, length);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setClob(parameterName, reader, length);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setBlob(final String parameterName, final InputStream inputStream, final long length) throws SQLException {
+    public void setBlob(final String parameterName, final InputStream inputStream, final long length)
+            throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setBlob(parameterName, inputStream, length);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setBlob(parameterName, inputStream, length);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -479,9 +991,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setNClob(final String parameterName, final Reader reader, final long length) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setNClob(parameterName, reader, length);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setNClob(parameterName, reader, length);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -490,9 +1001,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public NClob getNClob(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getNClob(parameterIndex);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getNClob(parameterIndex);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -502,9 +1012,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public NClob getNClob(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getNClob(parameterName);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getNClob(parameterName);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -514,9 +1023,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setSQLXML(final String parameterName, final SQLXML value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setSQLXML(parameterName, value);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setSQLXML(parameterName, value);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -525,9 +1033,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public SQLXML getSQLXML(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getSQLXML(parameterIndex);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getSQLXML(parameterIndex);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -537,9 +1044,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public SQLXML getSQLXML(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getSQLXML(parameterName);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getSQLXML(parameterName);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -549,9 +1055,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public String getNString(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getNString(parameterIndex);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getNString(parameterIndex);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -561,9 +1066,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public String getNString(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getNString(parameterName);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getNString(parameterName);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -573,9 +1077,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public Reader getNCharacterStream(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getNCharacterStream(parameterIndex);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getNCharacterStream(parameterIndex);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -585,9 +1088,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public Reader getNCharacterStream(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getNCharacterStream(parameterName);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getNCharacterStream(parameterName);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -597,9 +1099,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public Reader getCharacterStream(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getCharacterStream(parameterIndex);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getCharacterStream(parameterIndex);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -609,9 +1110,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public Reader getCharacterStream(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getCharacterStream(parameterName);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getCharacterStream(parameterName);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -621,9 +1121,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setBlob(final String parameterName, final Blob blob) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setBlob(parameterName, blob);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setBlob(parameterName, blob);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -632,42 +1131,41 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setClob(final String parameterName, final Clob clob) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setClob(parameterName, clob);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setClob(parameterName, clob);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setAsciiStream(final String parameterName, final InputStream inputStream, final long length) throws SQLException {
+    public void setAsciiStream(final String parameterName, final InputStream inputStream, final long length)
+            throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setAsciiStream(parameterName, inputStream, length);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setAsciiStream(parameterName, inputStream, length);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setBinaryStream(final String parameterName, final InputStream inputStream, final long length) throws SQLException {
+    public void setBinaryStream(final String parameterName, final InputStream inputStream, final long length)
+            throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setBinaryStream(parameterName, inputStream, length);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setBinaryStream(parameterName, inputStream, length);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setCharacterStream(final String parameterName, final Reader reader, final long length) throws SQLException {
+    public void setCharacterStream(final String parameterName, final Reader reader, final long length)
+            throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setCharacterStream(parameterName, reader, length);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setCharacterStream(parameterName, reader, length);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -676,9 +1174,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setAsciiStream(final String parameterName, final InputStream inputStream) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setAsciiStream(parameterName, inputStream);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setAsciiStream(parameterName, inputStream);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -687,9 +1184,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setBinaryStream(final String parameterName, final InputStream inputStream) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setBinaryStream(parameterName, inputStream);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setBinaryStream(parameterName, inputStream);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -698,9 +1194,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setCharacterStream(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setCharacterStream(parameterName, reader);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setCharacterStream(parameterName, reader);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -709,9 +1204,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setNCharacterStream(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setNCharacterStream(parameterName, reader);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setNCharacterStream(parameterName, reader);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -720,9 +1214,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setClob(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setClob(parameterName, reader);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setClob(parameterName, reader);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -731,9 +1224,8 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setBlob(final String parameterName, final InputStream inputStream) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setBlob(parameterName, inputStream);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setBlob(parameterName, inputStream);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -742,38 +1234,32 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement
     public void setNClob(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement)getDelegate()).setNClob(parameterName, reader);
-        }
-        catch (final SQLException e) {
+            ((CallableStatement) getDelegate()).setNClob(parameterName, reader);
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public <T> T getObject(final int parameterIndex, final Class<T> type)
-            throws SQLException {
+    public <T> T getObject(final int parameterIndex, final Class<T> type) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getObject(parameterIndex, type);
-}
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getObject(parameterIndex, type);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public <T> T getObject(final String parameterName, final Class<T> type)
-            throws SQLException {
+    public <T> T getObject(final String parameterName, final Class<T> type) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement)getDelegate()).getObject(parameterName, type);
-        }
-        catch (final SQLException e) {
+            return ((CallableStatement) getDelegate()).getObject(parameterName, type);
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
-
 }


[27/50] [abbrv] commons-dbcp git commit: Comment empty block.

Posted by gg...@apache.org.
Comment empty block.

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

Branch: refs/heads/release
Commit: 012b164d11282159f695c1af5e5f0ac27cbcfda3
Parents: 6aa057f
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:13:23 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:13:23 2018 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/PoolingDriver.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/012b164d/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
index 5e65574..730d9ba 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
@@ -166,6 +166,7 @@ public class PoolingDriver implements Driver {
                 pool.invalidateObject(pgconn.getDelegateInternal());
             }
             catch (final Exception e) {
+                // Ignore.
             }
         }
         else {


[21/50] [abbrv] commons-dbcp git commit: Better ivar name.

Posted by gg...@apache.org.
Better ivar name.

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

Branch: refs/heads/release
Commit: 75199a4d3244bf3f97979024ac15a55728cb0860
Parents: 0035402
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:00:33 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:00:33 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/DriverConnectionFactory.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/75199a4d/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
index 4c2686c..c7d5716 100644
--- a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
@@ -28,7 +28,7 @@ import java.util.Properties;
  */
 public class DriverConnectionFactory implements ConnectionFactory {
 
-    private final String connectionUri;
+    private final String connectionString;
     private final Driver driver;
     private final Properties properties;
 
@@ -44,18 +44,18 @@ public class DriverConnectionFactory implements ConnectionFactory {
      */
     public DriverConnectionFactory(final Driver driver, final String connectString, final Properties properties) {
         this.driver = driver;
-        this.connectionUri = connectString;
+        this.connectionString = connectString;
         this.properties = properties;
     }
 
     @Override
     public Connection createConnection() throws SQLException {
-        return driver.connect(connectionUri, properties);
+        return driver.connect(connectionString, properties);
     }
 
     @Override
     public String toString() {
-        return this.getClass().getName() + " [" + String.valueOf(driver) + ";" + String.valueOf(connectionUri) + ";"
+        return this.getClass().getName() + " [" + String.valueOf(driver) + ";" + String.valueOf(connectionString) + ";"
                 + String.valueOf(properties) + "]";
     }
 }


[49/50] [abbrv] commons-dbcp git commit: Prepare for release 2.4.0.

Posted by gg...@apache.org.
Prepare for release 2.4.0.

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

Branch: refs/heads/release
Commit: 8c42fb865dfb1a478d3c2d54f1741caaa10f3587
Parents: 4148549
Author: Gary Gregory <ga...@gmail.com>
Authored: Wed Jun 13 11:22:44 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Jun 13 11:22:44 2018 -0600

----------------------------------------------------------------------
 RELEASE-NOTES.txt | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/8c42fb86/RELEASE-NOTES.txt
----------------------------------------------------------------------
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 8649b4f..acf3ef1 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,8 +1,8 @@
               Apache Apache Commons DBCP
-                  Version 2.4.0
-                  RELEASE NOTES
+                 Version 2.4.0
+                 RELEASE NOTES
 
-The Apache Commons DBCP team is pleased to announce the release of Apache Apache Commons DBCP 2.4.0.
+The Apache Commons DBCP team is pleased to announce the release of Apache Apache Commons DBCP 2.4.0-SNAPSHOT.
 
 Apache Commons DBCP software implements Database Connection Pooling.
 
@@ -10,6 +10,7 @@ This is a minor release, including bug fixes and enhancements.
 
 Changes in this version include:
 
+
 Fixed Bugs:
 o DBCP-484:  Connection leak during XATransaction in high load. Thanks to Emanuel Freitas.
 o DBCP-496:  Add support for pooling CallableStatements to the org.apache.commons.dbcp2.cpdsadapter package. Thanks to Gary Gregory.
@@ -20,6 +21,12 @@ o DBCP-491:  Ensure DBCP ConnectionListener can deal with transaction managers w
 o DBCP-494:  org.apache.commons.dbcp2.PStmtKey should make copies of given arrays in constructors. Thanks to Gary Gregory.
 o DBCP-495:  Remove duplicate code in org.apache.commons.dbcp2.cpdsadapter.PStmtKeyCPDS. Thanks to Gary Gregory.
 o DBCP-497:  Deprecate use of PStmtKeyCPDS in favor of PStmtKey. Thanks to Gary Gregory.
+o DBCP-498:  org.apache.commons.dbcp2.DataSourceConnectionFactory should use a char[] instead of a String to store passwords. Thanks to Gary Gregory.
+o DBCP-499:  org.apache.commons.dbcp2.managed.DataSourceXAConnectionFactory should use a char[] instead of a String to store passwords. Thanks to Gary Gregory.
+o DBCP-500:  org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS should use a char[] instead of a String to store passwords. Thanks to Gary Gregory.
+o DBCP-501:  org.apache.commons.dbcp2.datasources.CPDSConnectionFactory should use a char[] instead of a String to store passwords. Thanks to Gary Gregory.
+o DBCP-502:  org.apache.commons.dbcp2.datasources internals should use a char[] instead of a String to store passwords. Thanks to Gary Gregory.
+o DBCP-503:  org.apache.commons.dbcp2.datasources.InstanceKeyDataSourceFactory.closeAll() does not close all. Thanks to Gary Gregory.
 
 
 For complete information on Apache Commons DBCP, including instructions on how to submit bug reports,
@@ -27,6 +34,7 @@ patches, or suggestions for improvement, see the Apache Apache Commons DBCP webs
 
 http://commons.apache.org/dbcp/
 
+
 -----------------------------------------------------------------------------
 
               Apache Apache Commons DBCP


[17/50] [abbrv] commons-dbcp git commit: Add missing Javadoc.

Posted by gg...@apache.org.
Add missing Javadoc.

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

Branch: refs/heads/release
Commit: b572ad1e3f956edc958b0142c0e6d296a9d24c6b
Parents: 9a61dc0
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:55:52 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:55:52 2018 -0600

----------------------------------------------------------------------
 .../apache/commons/dbcp2/DelegatingConnection.java   | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/b572ad1e/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index 6259bfc..606ba94 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -172,6 +172,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
      * This method is useful when you may have nested
      * {@code DelegatingConnection}s, and you want to make
      * sure to obtain a "genuine" {@link Connection}.
+     * 
+     * @return innermost delegate. 
      */
     public Connection getInnermostDelegate() {
         return getInnermostDelegateInternal();
@@ -182,6 +184,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
      * Although this method is public, it is part of the internal API and should
      * not be used by clients. The signature of this method may change at any
      * time including in ways that break backwards compatibility.
+     * 
+     * @return innermost delegate. 
      */
     public final Connection getInnermostDelegateInternal() {
         Connection c = connection;
@@ -194,9 +198,14 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         return c;
     }
 
-    /** Sets my delegate. */
-    public void setDelegate(final C c) {
-        connection = c;
+    /**
+     * Sets my delegate.
+     * 
+     * @param connection
+     *            my delegate.
+     */
+    public void setDelegate(final C connection) {
+        this.connection = connection;
     }
 
     /**


[48/50] [abbrv] commons-dbcp git commit: Fix project description.

Posted by gg...@apache.org.
Fix project description.

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

Branch: refs/heads/release
Commit: 4148549ee5b704b4f1291167b9914b8109084132
Parents: e50c522
Author: Gary Gregory <ga...@gmail.com>
Authored: Wed Jun 13 11:21:08 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Jun 13 11:21:08 2018 -0600

----------------------------------------------------------------------
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/4148549e/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 0f55474..2e68dff 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ Apache Commons DBCP
 [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-dbcp2/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.commons/commons-dbcp2/)
 [![Javadocs](https://javadoc.io/badge/org.apache.commons/commons-dbcp2/2.4.0.svg)](https://javadoc.io/doc/org.apache.commons/commons-dbcp2/2.4.0)
 
-${project.description}
+Apache Commons DBCP software implements Database Connection Pooling
 
 Documentation
 -------------


[38/50] [abbrv] commons-dbcp git commit: Line length 120.

Posted by gg...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
index fbfef78..ce44833 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -42,15 +42,12 @@ import java.util.Map;
 /**
  * A base delegating implementation of {@link ResultSet}.
  * <p>
- * All of the methods from the {@link ResultSet} interface
- * simply call the corresponding method on the "delegate"
+ * All of the methods from the {@link ResultSet} interface simply call the corresponding method on the "delegate"
  * provided in my constructor.
  * </p>
  * <p>
- * Extends AbandonedTrace to implement result set tracking and
- * logging of code which created the ResultSet. Tracking the
- * ResultSet ensures that the Statement which created it can
- * close any open ResultSet's on Statement close.
+ * Extends AbandonedTrace to implement result set tracking and logging of code which created the ResultSet. Tracking the
+ * ResultSet ensures that the Statement which created it can close any open ResultSet's on Statement close.
  * </p>
  *
  * @since 2.0
@@ -67,12 +64,10 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     private Connection connection;
 
     /**
-     * Creates a wrapper for the ResultSet which traces this
-     * ResultSet to the Statement which created it and the
-     * code which created it.
+     * Creates a wrapper for the ResultSet which traces this ResultSet to the Statement which created it and the code
+     * which created it.
      * <p>
-     * Private to ensure all construction is
-     * {@link #wrapResultSet(Statement, ResultSet)}
+     * Private to ensure all construction is {@link #wrapResultSet(Statement, ResultSet)}
      * </p>
      *
      * @param statement
@@ -81,25 +76,25 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
      *            The ResultSet to wrap.
      */
     private DelegatingResultSet(final Statement statement, final ResultSet resultSet) {
-        super((AbandonedTrace)statement);
+        super((AbandonedTrace) statement);
         this.statement = statement;
         this.resultSet = resultSet;
     }
 
     /**
-     * Creates a wrapper for the ResultSet which traces this
-     * ResultSet to the Connection which created it (via, for
+     * Creates a wrapper for the ResultSet which traces this ResultSet to the Connection which created it (via, for
      * example DatabaseMetadata, and the code which created it.
      * <p>
-     * Private to ensure all construction is
-     * {@link #wrapResultSet(Connection, ResultSet)}
+     * Private to ensure all construction is {@link #wrapResultSet(Connection, ResultSet)}
      * </p>
      *
-     * @param conn Connection which created this ResultSet
-     * @param res ResultSet to wrap
+     * @param conn
+     *            Connection which created this ResultSet
+     * @param res
+     *            ResultSet to wrap
      */
     private DelegatingResultSet(final Connection conn, final ResultSet res) {
-        super((AbandonedTrace)conn);
+        super((AbandonedTrace) conn);
         this.connection = conn;
         this.resultSet = res;
     }
@@ -146,29 +141,24 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     }
 
     /**
-     * If my underlying {@link ResultSet} is not a
-     * {@code DelegatingResultSet}, returns it,
-     * otherwise recursively invokes this method on
-     * my delegate.
+     * If my underlying {@link ResultSet} is not a {@code DelegatingResultSet}, returns it, otherwise recursively
+     * invokes this method on my delegate.
      * <p>
-     * Hence this method will return the first
-     * delegate that is not a {@code DelegatingResultSet},
-     * or {@code null} when no non-{@code DelegatingResultSet}
-     * delegate can be found by traversing this chain.
+     * Hence this method will return the first delegate that is not a {@code DelegatingResultSet}, or {@code null} when
+     * no non-{@code DelegatingResultSet} delegate can be found by traversing this chain.
      * </p>
      * <p>
-     * This method is useful when you may have nested
-     * {@code DelegatingResultSet}s, and you want to make
-     * sure to obtain a "genuine" {@link ResultSet}.
+     * This method is useful when you may have nested {@code DelegatingResultSet}s, and you want to make sure to obtain
+     * a "genuine" {@link ResultSet}.
      * </p>
      *
      * @return the innermost delegate.
      */
     public ResultSet getInnermostDelegate() {
         ResultSet r = resultSet;
-        while(r != null && r instanceof DelegatingResultSet) {
-            r = ((DelegatingResultSet)r).getDelegate();
-            if(this == r) {
+        while (r != null && r instanceof DelegatingResultSet) {
+            r = ((DelegatingResultSet) r).getDelegate();
+            if (this == r) {
                 return null;
             }
         }
@@ -181,597 +171,1356 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     }
 
     /**
-     * Wrapper for close of ResultSet which removes this
-     * result set from being traced then calls close on
-     * the original ResultSet.
+     * Wrapper for close of ResultSet which removes this result set from being traced then calls close on the original
+     * ResultSet.
      */
     @Override
     public void close() throws SQLException {
         try {
-            if(statement != null) {
-                ((AbandonedTrace)statement).removeTrace(this);
+            if (statement != null) {
+                ((AbandonedTrace) statement).removeTrace(this);
                 statement = null;
             }
-            if(connection != null) {
-                ((AbandonedTrace)connection).removeTrace(this);
+            if (connection != null) {
+                ((AbandonedTrace) connection).removeTrace(this);
                 connection = null;
             }
             resultSet.close();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     protected void handleException(final SQLException e) throws SQLException {
         if (statement != null && statement instanceof DelegatingStatement) {
-            ((DelegatingStatement)statement).handleException(e);
-        }
-        else if (connection != null && connection instanceof DelegatingConnection) {
-            ((DelegatingConnection<?>)connection).handleException(e);
-        }
-        else {
+            ((DelegatingStatement) statement).handleException(e);
+        } else if (connection != null && connection instanceof DelegatingConnection) {
+            ((DelegatingConnection<?>) connection).handleException(e);
+        } else {
             throw e;
         }
     }
 
     @Override
-    public boolean next() throws SQLException
-    { try { return resultSet.next(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean next() throws SQLException {
+        try {
+            return resultSet.next();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean wasNull() throws SQLException
-    { try { return resultSet.wasNull(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean wasNull() throws SQLException {
+        try {
+            return resultSet.wasNull();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public String getString(final int columnIndex) throws SQLException
-    { try { return resultSet.getString(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public String getString(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getString(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public boolean getBoolean(final int columnIndex) throws SQLException
-    { try { return resultSet.getBoolean(columnIndex); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean getBoolean(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getBoolean(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public byte getByte(final int columnIndex) throws SQLException
-    { try { return resultSet.getByte(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public byte getByte(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getByte(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public short getShort(final int columnIndex) throws SQLException
-    { try { return resultSet.getShort(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public short getShort(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getShort(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public int getInt(final int columnIndex) throws SQLException
-    { try { return resultSet.getInt(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getInt(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getInt(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public long getLong(final int columnIndex) throws SQLException
-    { try { return resultSet.getLong(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public long getLong(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getLong(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public float getFloat(final int columnIndex) throws SQLException
-    { try { return resultSet.getFloat(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public float getFloat(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getFloat(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public double getDouble(final int columnIndex) throws SQLException
-    { try { return resultSet.getDouble(columnIndex); } catch (final SQLException e) { handleException(e); return 0; } }
+    public double getDouble(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getDouble(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     /** @deprecated Use {@link #getBigDecimal(int)} */
     @Deprecated
     @Override
-    public BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException
-    { try { return resultSet.getBigDecimal(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public BigDecimal getBigDecimal(final int columnIndex, final int scale) throws SQLException {
+        try {
+            return resultSet.getBigDecimal(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public byte[] getBytes(final int columnIndex) throws SQLException
-    { try { return resultSet.getBytes(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public byte[] getBytes(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getBytes(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final int columnIndex) throws SQLException
-    { try { return resultSet.getDate(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getDate(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final int columnIndex) throws SQLException
-    { try { return resultSet.getTime(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getTime(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final int columnIndex) throws SQLException
-    { try { return resultSet.getTimestamp(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Timestamp getTimestamp(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getTimestamp(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public InputStream getAsciiStream(final int columnIndex) throws SQLException
-    { try { return resultSet.getAsciiStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public InputStream getAsciiStream(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getAsciiStream(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     /** @deprecated Use {@link #getCharacterStream(int)} */
     @Deprecated
     @Override
-    public InputStream getUnicodeStream(final int columnIndex) throws SQLException
-    { try { return resultSet.getUnicodeStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public InputStream getUnicodeStream(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getUnicodeStream(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public InputStream getBinaryStream(final int columnIndex) throws SQLException
-    { try { return resultSet.getBinaryStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public InputStream getBinaryStream(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getBinaryStream(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public String getString(final String columnName) throws SQLException
-    { try { return resultSet.getString(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public String getString(final String columnName) throws SQLException {
+        try {
+            return resultSet.getString(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public boolean getBoolean(final String columnName) throws SQLException
-    { try { return resultSet.getBoolean(columnName); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean getBoolean(final String columnName) throws SQLException {
+        try {
+            return resultSet.getBoolean(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public byte getByte(final String columnName) throws SQLException
-    { try { return resultSet.getByte(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public byte getByte(final String columnName) throws SQLException {
+        try {
+            return resultSet.getByte(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public short getShort(final String columnName) throws SQLException
-    { try { return resultSet.getShort(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public short getShort(final String columnName) throws SQLException {
+        try {
+            return resultSet.getShort(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public int getInt(final String columnName) throws SQLException
-    { try { return resultSet.getInt(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getInt(final String columnName) throws SQLException {
+        try {
+            return resultSet.getInt(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public long getLong(final String columnName) throws SQLException
-    { try { return resultSet.getLong(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public long getLong(final String columnName) throws SQLException {
+        try {
+            return resultSet.getLong(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public float getFloat(final String columnName) throws SQLException
-    { try { return resultSet.getFloat(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public float getFloat(final String columnName) throws SQLException {
+        try {
+            return resultSet.getFloat(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public double getDouble(final String columnName) throws SQLException
-    { try { return resultSet.getDouble(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public double getDouble(final String columnName) throws SQLException {
+        try {
+            return resultSet.getDouble(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     /** @deprecated Use {@link #getBigDecimal(String)} */
     @Deprecated
     @Override
-    public BigDecimal getBigDecimal(final String columnName, final int scale) throws SQLException
-    { try { return resultSet.getBigDecimal(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public BigDecimal getBigDecimal(final String columnName, final int scale) throws SQLException {
+        try {
+            return resultSet.getBigDecimal(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public byte[] getBytes(final String columnName) throws SQLException
-    { try { return resultSet.getBytes(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public byte[] getBytes(final String columnName) throws SQLException {
+        try {
+            return resultSet.getBytes(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final String columnName) throws SQLException
-    { try { return resultSet.getDate(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final String columnName) throws SQLException {
+        try {
+            return resultSet.getDate(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final String columnName) throws SQLException
-    { try { return resultSet.getTime(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final String columnName) throws SQLException {
+        try {
+            return resultSet.getTime(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final String columnName) throws SQLException
-    { try { return resultSet.getTimestamp(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Timestamp getTimestamp(final String columnName) throws SQLException {
+        try {
+            return resultSet.getTimestamp(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public InputStream getAsciiStream(final String columnName) throws SQLException
-    { try { return resultSet.getAsciiStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public InputStream getAsciiStream(final String columnName) throws SQLException {
+        try {
+            return resultSet.getAsciiStream(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     /** @deprecated Use {@link #getCharacterStream(String)} */
     @Deprecated
     @Override
-    public InputStream getUnicodeStream(final String columnName) throws SQLException
-    { try { return resultSet.getUnicodeStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public InputStream getUnicodeStream(final String columnName) throws SQLException {
+        try {
+            return resultSet.getUnicodeStream(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public InputStream getBinaryStream(final String columnName) throws SQLException
-    { try { return resultSet.getBinaryStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public InputStream getBinaryStream(final String columnName) throws SQLException {
+        try {
+            return resultSet.getBinaryStream(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public SQLWarning getWarnings() throws SQLException
-    { try { return resultSet.getWarnings(); } catch (final SQLException e) { handleException(e); return null; } }
+    public SQLWarning getWarnings() throws SQLException {
+        try {
+            return resultSet.getWarnings();
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public void clearWarnings() throws SQLException
-    { try { resultSet.clearWarnings(); } catch (final SQLException e) { handleException(e); } }
+    public void clearWarnings() throws SQLException {
+        try {
+            resultSet.clearWarnings();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public String getCursorName() throws SQLException
-    { try { return resultSet.getCursorName(); } catch (final SQLException e) { handleException(e); return null; } }
+    public String getCursorName() throws SQLException {
+        try {
+            return resultSet.getCursorName();
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public ResultSetMetaData getMetaData() throws SQLException
-    { try { return resultSet.getMetaData(); } catch (final SQLException e) { handleException(e); return null; } }
+    public ResultSetMetaData getMetaData() throws SQLException {
+        try {
+            return resultSet.getMetaData();
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Object getObject(final int columnIndex) throws SQLException
-    { try { return resultSet.getObject(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getObject(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Object getObject(final String columnName) throws SQLException
-    { try { return resultSet.getObject(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final String columnName) throws SQLException {
+        try {
+            return resultSet.getObject(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public int findColumn(final String columnName) throws SQLException
-    { try { return resultSet.findColumn(columnName); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int findColumn(final String columnName) throws SQLException {
+        try {
+            return resultSet.findColumn(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public Reader getCharacterStream(final int columnIndex) throws SQLException
-    { try { return resultSet.getCharacterStream(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public Reader getCharacterStream(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getCharacterStream(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Reader getCharacterStream(final String columnName) throws SQLException
-    { try { return resultSet.getCharacterStream(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Reader getCharacterStream(final String columnName) throws SQLException {
+        try {
+            return resultSet.getCharacterStream(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public BigDecimal getBigDecimal(final int columnIndex) throws SQLException
-    { try { return resultSet.getBigDecimal(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public BigDecimal getBigDecimal(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getBigDecimal(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public BigDecimal getBigDecimal(final String columnName) throws SQLException
-    { try { return resultSet.getBigDecimal(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public BigDecimal getBigDecimal(final String columnName) throws SQLException {
+        try {
+            return resultSet.getBigDecimal(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public boolean isBeforeFirst() throws SQLException
-    { try { return resultSet.isBeforeFirst(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean isBeforeFirst() throws SQLException {
+        try {
+            return resultSet.isBeforeFirst();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean isAfterLast() throws SQLException
-    { try { return resultSet.isAfterLast(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean isAfterLast() throws SQLException {
+        try {
+            return resultSet.isAfterLast();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean isFirst() throws SQLException
-    { try { return resultSet.isFirst(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean isFirst() throws SQLException {
+        try {
+            return resultSet.isFirst();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean isLast() throws SQLException
-    { try { return resultSet.isLast(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean isLast() throws SQLException {
+        try {
+            return resultSet.isLast();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public void beforeFirst() throws SQLException
-    { try { resultSet.beforeFirst(); } catch (final SQLException e) { handleException(e); } }
+    public void beforeFirst() throws SQLException {
+        try {
+            resultSet.beforeFirst();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void afterLast() throws SQLException
-    { try { resultSet.afterLast(); } catch (final SQLException e) { handleException(e); } }
+    public void afterLast() throws SQLException {
+        try {
+            resultSet.afterLast();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public boolean first() throws SQLException
-    { try { return resultSet.first(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean first() throws SQLException {
+        try {
+            return resultSet.first();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean last() throws SQLException
-    { try { return resultSet.last(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean last() throws SQLException {
+        try {
+            return resultSet.last();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public int getRow() throws SQLException
-    { try { return resultSet.getRow(); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getRow() throws SQLException {
+        try {
+            return resultSet.getRow();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public boolean absolute(final int row) throws SQLException
-    { try { return resultSet.absolute(row); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean absolute(final int row) throws SQLException {
+        try {
+            return resultSet.absolute(row);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean relative(final int rows) throws SQLException
-    { try { return resultSet.relative(rows); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean relative(final int rows) throws SQLException {
+        try {
+            return resultSet.relative(rows);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean previous() throws SQLException
-    { try { return resultSet.previous(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean previous() throws SQLException {
+        try {
+            return resultSet.previous();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public void setFetchDirection(final int direction) throws SQLException
-    { try { resultSet.setFetchDirection(direction); } catch (final SQLException e) { handleException(e); } }
+    public void setFetchDirection(final int direction) throws SQLException {
+        try {
+            resultSet.setFetchDirection(direction);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public int getFetchDirection() throws SQLException
-    { try { return resultSet.getFetchDirection(); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getFetchDirection() throws SQLException {
+        try {
+            return resultSet.getFetchDirection();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public void setFetchSize(final int rows) throws SQLException
-    { try { resultSet.setFetchSize(rows); } catch (final SQLException e) { handleException(e); } }
+    public void setFetchSize(final int rows) throws SQLException {
+        try {
+            resultSet.setFetchSize(rows);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public int getFetchSize() throws SQLException
-    { try { return resultSet.getFetchSize(); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getFetchSize() throws SQLException {
+        try {
+            return resultSet.getFetchSize();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public int getType() throws SQLException
-    { try { return resultSet.getType(); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getType() throws SQLException {
+        try {
+            return resultSet.getType();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public int getConcurrency() throws SQLException
-    { try { return resultSet.getConcurrency(); } catch (final SQLException e) { handleException(e); return 0; } }
+    public int getConcurrency() throws SQLException {
+        try {
+            return resultSet.getConcurrency();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
+    }
 
     @Override
-    public boolean rowUpdated() throws SQLException
-    { try { return resultSet.rowUpdated(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean rowUpdated() throws SQLException {
+        try {
+            return resultSet.rowUpdated();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean rowInserted() throws SQLException
-    { try { return resultSet.rowInserted(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean rowInserted() throws SQLException {
+        try {
+            return resultSet.rowInserted();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public boolean rowDeleted() throws SQLException
-    { try { return resultSet.rowDeleted(); } catch (final SQLException e) { handleException(e); return false; } }
+    public boolean rowDeleted() throws SQLException {
+        try {
+            return resultSet.rowDeleted();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
 
     @Override
-    public void updateNull(final int columnIndex) throws SQLException
-    { try { resultSet.updateNull(columnIndex); } catch (final SQLException e) { handleException(e); } }
+    public void updateNull(final int columnIndex) throws SQLException {
+        try {
+            resultSet.updateNull(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBoolean(final int columnIndex, final boolean x) throws SQLException
-    { try { resultSet.updateBoolean(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBoolean(final int columnIndex, final boolean x) throws SQLException {
+        try {
+            resultSet.updateBoolean(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateByte(final int columnIndex, final byte x) throws SQLException
-    { try { resultSet.updateByte(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateByte(final int columnIndex, final byte x) throws SQLException {
+        try {
+            resultSet.updateByte(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateShort(final int columnIndex, final short x) throws SQLException
-    { try { resultSet.updateShort(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateShort(final int columnIndex, final short x) throws SQLException {
+        try {
+            resultSet.updateShort(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateInt(final int columnIndex, final int x) throws SQLException
-    { try { resultSet.updateInt(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateInt(final int columnIndex, final int x) throws SQLException {
+        try {
+            resultSet.updateInt(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateLong(final int columnIndex, final long x) throws SQLException
-    { try { resultSet.updateLong(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateLong(final int columnIndex, final long x) throws SQLException {
+        try {
+            resultSet.updateLong(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateFloat(final int columnIndex, final float x) throws SQLException
-    { try { resultSet.updateFloat(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateFloat(final int columnIndex, final float x) throws SQLException {
+        try {
+            resultSet.updateFloat(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateDouble(final int columnIndex, final double x) throws SQLException
-    { try { resultSet.updateDouble(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateDouble(final int columnIndex, final double x) throws SQLException {
+        try {
+            resultSet.updateDouble(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException
-    { try { resultSet.updateBigDecimal(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBigDecimal(final int columnIndex, final BigDecimal x) throws SQLException {
+        try {
+            resultSet.updateBigDecimal(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateString(final int columnIndex, final String x) throws SQLException
-    { try { resultSet.updateString(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateString(final int columnIndex, final String x) throws SQLException {
+        try {
+            resultSet.updateString(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBytes(final int columnIndex, final byte[] x) throws SQLException
-    { try { resultSet.updateBytes(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBytes(final int columnIndex, final byte[] x) throws SQLException {
+        try {
+            resultSet.updateBytes(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateDate(final int columnIndex, final Date x) throws SQLException
-    { try { resultSet.updateDate(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateDate(final int columnIndex, final Date x) throws SQLException {
+        try {
+            resultSet.updateDate(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateTime(final int columnIndex, final Time x) throws SQLException
-    { try { resultSet.updateTime(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateTime(final int columnIndex, final Time x) throws SQLException {
+        try {
+            resultSet.updateTime(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException
-    { try { resultSet.updateTimestamp(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException {
+        try {
+            resultSet.updateTimestamp(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException
-    { try { resultSet.updateAsciiStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
+    public void updateAsciiStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
+        try {
+            resultSet.updateAsciiStream(columnIndex, x, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException
-    { try { resultSet.updateBinaryStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
+    public void updateBinaryStream(final int columnIndex, final InputStream x, final int length) throws SQLException {
+        try {
+            resultSet.updateBinaryStream(columnIndex, x, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException
-    { try { resultSet.updateCharacterStream(columnIndex, x, length); } catch (final SQLException e) { handleException(e); } }
+    public void updateCharacterStream(final int columnIndex, final Reader x, final int length) throws SQLException {
+        try {
+            resultSet.updateCharacterStream(columnIndex, x, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateObject(final int columnIndex, final Object x, final int scale) throws SQLException
-    { try { resultSet.updateObject(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateObject(final int columnIndex, final Object x, final int scale) throws SQLException {
+        try {
+            resultSet.updateObject(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateObject(final int columnIndex, final Object x) throws SQLException
-    { try { resultSet.updateObject(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateObject(final int columnIndex, final Object x) throws SQLException {
+        try {
+            resultSet.updateObject(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateNull(final String columnName) throws SQLException
-    { try { resultSet.updateNull(columnName); } catch (final SQLException e) { handleException(e); } }
+    public void updateNull(final String columnName) throws SQLException {
+        try {
+            resultSet.updateNull(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBoolean(final String columnName, final boolean x) throws SQLException
-    { try { resultSet.updateBoolean(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBoolean(final String columnName, final boolean x) throws SQLException {
+        try {
+            resultSet.updateBoolean(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateByte(final String columnName, final byte x) throws SQLException
-    { try { resultSet.updateByte(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateByte(final String columnName, final byte x) throws SQLException {
+        try {
+            resultSet.updateByte(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateShort(final String columnName, final short x) throws SQLException
-    { try { resultSet.updateShort(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateShort(final String columnName, final short x) throws SQLException {
+        try {
+            resultSet.updateShort(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateInt(final String columnName, final int x) throws SQLException
-    { try { resultSet.updateInt(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateInt(final String columnName, final int x) throws SQLException {
+        try {
+            resultSet.updateInt(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateLong(final String columnName, final long x) throws SQLException
-    { try { resultSet.updateLong(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateLong(final String columnName, final long x) throws SQLException {
+        try {
+            resultSet.updateLong(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateFloat(final String columnName, final float x) throws SQLException
-    { try { resultSet.updateFloat(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateFloat(final String columnName, final float x) throws SQLException {
+        try {
+            resultSet.updateFloat(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateDouble(final String columnName, final double x) throws SQLException
-    { try { resultSet.updateDouble(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateDouble(final String columnName, final double x) throws SQLException {
+        try {
+            resultSet.updateDouble(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBigDecimal(final String columnName, final BigDecimal x) throws SQLException
-    { try { resultSet.updateBigDecimal(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBigDecimal(final String columnName, final BigDecimal x) throws SQLException {
+        try {
+            resultSet.updateBigDecimal(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateString(final String columnName, final String x) throws SQLException
-    { try { resultSet.updateString(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateString(final String columnName, final String x) throws SQLException {
+        try {
+            resultSet.updateString(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBytes(final String columnName, final byte[] x) throws SQLException
-    { try { resultSet.updateBytes(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBytes(final String columnName, final byte[] x) throws SQLException {
+        try {
+            resultSet.updateBytes(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateDate(final String columnName, final Date x) throws SQLException
-    { try { resultSet.updateDate(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateDate(final String columnName, final Date x) throws SQLException {
+        try {
+            resultSet.updateDate(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateTime(final String columnName, final Time x) throws SQLException
-    { try { resultSet.updateTime(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateTime(final String columnName, final Time x) throws SQLException {
+        try {
+            resultSet.updateTime(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateTimestamp(final String columnName, final Timestamp x) throws SQLException
-    { try { resultSet.updateTimestamp(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateTimestamp(final String columnName, final Timestamp x) throws SQLException {
+        try {
+            resultSet.updateTimestamp(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateAsciiStream(final String columnName, final InputStream x, final int length) throws SQLException
-    { try { resultSet.updateAsciiStream(columnName, x, length); } catch (final SQLException e) { handleException(e); } }
+    public void updateAsciiStream(final String columnName, final InputStream x, final int length) throws SQLException {
+        try {
+            resultSet.updateAsciiStream(columnName, x, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBinaryStream(final String columnName, final InputStream x, final int length) throws SQLException
-    { try { resultSet.updateBinaryStream(columnName, x, length); } catch (final SQLException e) { handleException(e); } }
+    public void updateBinaryStream(final String columnName, final InputStream x, final int length) throws SQLException {
+        try {
+            resultSet.updateBinaryStream(columnName, x, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateCharacterStream(final String columnName, final Reader reader, final int length) throws SQLException
-    { try { resultSet.updateCharacterStream(columnName, reader, length); } catch (final SQLException e) { handleException(e); } }
+    public void updateCharacterStream(final String columnName, final Reader reader, final int length)
+            throws SQLException {
+        try {
+            resultSet.updateCharacterStream(columnName, reader, length);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateObject(final String columnName, final Object x, final int scale) throws SQLException
-    { try { resultSet.updateObject(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateObject(final String columnName, final Object x, final int scale) throws SQLException {
+        try {
+            resultSet.updateObject(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateObject(final String columnName, final Object x) throws SQLException
-    { try { resultSet.updateObject(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateObject(final String columnName, final Object x) throws SQLException {
+        try {
+            resultSet.updateObject(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void insertRow() throws SQLException
-    { try { resultSet.insertRow(); } catch (final SQLException e) { handleException(e); } }
+    public void insertRow() throws SQLException {
+        try {
+            resultSet.insertRow();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateRow() throws SQLException
-    { try { resultSet.updateRow(); } catch (final SQLException e) { handleException(e); } }
+    public void updateRow() throws SQLException {
+        try {
+            resultSet.updateRow();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void deleteRow() throws SQLException
-    { try { resultSet.deleteRow(); } catch (final SQLException e) { handleException(e); } }
+    public void deleteRow() throws SQLException {
+        try {
+            resultSet.deleteRow();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void refreshRow() throws SQLException
-    { try { resultSet.refreshRow(); } catch (final SQLException e) { handleException(e); } }
+    public void refreshRow() throws SQLException {
+        try {
+            resultSet.refreshRow();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void cancelRowUpdates() throws SQLException
-    { try { resultSet.cancelRowUpdates(); } catch (final SQLException e) { handleException(e); } }
+    public void cancelRowUpdates() throws SQLException {
+        try {
+            resultSet.cancelRowUpdates();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void moveToInsertRow() throws SQLException
-    { try { resultSet.moveToInsertRow(); } catch (final SQLException e) { handleException(e); } }
+    public void moveToInsertRow() throws SQLException {
+        try {
+            resultSet.moveToInsertRow();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void moveToCurrentRow() throws SQLException
-    { try { resultSet.moveToCurrentRow(); } catch (final SQLException e) { handleException(e); } }
+    public void moveToCurrentRow() throws SQLException {
+        try {
+            resultSet.moveToCurrentRow();
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public Object getObject(final int i, final Map<String,Class<?>> map) throws SQLException
-    { try { return resultSet.getObject(i, map); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException {
+        try {
+            return resultSet.getObject(i, map);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Ref getRef(final int i) throws SQLException
-    { try { return resultSet.getRef(i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Ref getRef(final int i) throws SQLException {
+        try {
+            return resultSet.getRef(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Blob getBlob(final int i) throws SQLException
-    { try { return resultSet.getBlob(i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Blob getBlob(final int i) throws SQLException {
+        try {
+            return resultSet.getBlob(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Clob getClob(final int i) throws SQLException
-    { try { return resultSet.getClob(i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Clob getClob(final int i) throws SQLException {
+        try {
+            return resultSet.getClob(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Array getArray(final int i) throws SQLException
-    { try { return resultSet.getArray(i); } catch (final SQLException e) { handleException(e); return null; } }
+    public Array getArray(final int i) throws SQLException {
+        try {
+            return resultSet.getArray(i);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Object getObject(final String colName, final Map<String,Class<?>> map) throws SQLException
-    { try { return resultSet.getObject(colName, map); } catch (final SQLException e) { handleException(e); return null; } }
+    public Object getObject(final String colName, final Map<String, Class<?>> map) throws SQLException {
+        try {
+            return resultSet.getObject(colName, map);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Ref getRef(final String colName) throws SQLException
-    { try { return resultSet.getRef(colName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Ref getRef(final String colName) throws SQLException {
+        try {
+            return resultSet.getRef(colName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Blob getBlob(final String colName) throws SQLException
-    { try { return resultSet.getBlob(colName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Blob getBlob(final String colName) throws SQLException {
+        try {
+            return resultSet.getBlob(colName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Clob getClob(final String colName) throws SQLException
-    { try { return resultSet.getClob(colName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Clob getClob(final String colName) throws SQLException {
+        try {
+            return resultSet.getClob(colName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Array getArray(final String colName) throws SQLException
-    { try { return resultSet.getArray(colName); } catch (final SQLException e) { handleException(e); return null; } }
+    public Array getArray(final String colName) throws SQLException {
+        try {
+            return resultSet.getArray(colName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final int columnIndex, final Calendar cal) throws SQLException
-    { try { return resultSet.getDate(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final int columnIndex, final Calendar cal) throws SQLException {
+        try {
+            return resultSet.getDate(columnIndex, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Date getDate(final String columnName, final Calendar cal) throws SQLException
-    { try { return resultSet.getDate(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Date getDate(final String columnName, final Calendar cal) throws SQLException {
+        try {
+            return resultSet.getDate(columnName, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final int columnIndex, final Calendar cal) throws SQLException
-    { try { return resultSet.getTime(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final int columnIndex, final Calendar cal) throws SQLException {
+        try {
+            return resultSet.getTime(columnIndex, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Time getTime(final String columnName, final Calendar cal) throws SQLException
-    { try { return resultSet.getTime(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Time getTime(final String columnName, final Calendar cal) throws SQLException {
+        try {
+            return resultSet.getTime(columnName, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException
-    { try { return resultSet.getTimestamp(columnIndex, cal); } catch (final SQLException e) { handleException(e); return null; } }
+    public Timestamp getTimestamp(final int columnIndex, final Calendar cal) throws SQLException {
+        try {
+            return resultSet.getTimestamp(columnIndex, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public Timestamp getTimestamp(final String columnName, final Calendar cal) throws SQLException
-    { try { return resultSet.getTimestamp(columnName, cal); } catch (final SQLException e) { handleException(e); return null; } }
-
+    public Timestamp getTimestamp(final String columnName, final Calendar cal) throws SQLException {
+        try {
+            return resultSet.getTimestamp(columnName, cal);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public java.net.URL getURL(final int columnIndex) throws SQLException
-    { try { return resultSet.getURL(columnIndex); } catch (final SQLException e) { handleException(e); return null; } }
+    public java.net.URL getURL(final int columnIndex) throws SQLException {
+        try {
+            return resultSet.getURL(columnIndex);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public java.net.URL getURL(final String columnName) throws SQLException
-    { try { return resultSet.getURL(columnName); } catch (final SQLException e) { handleException(e); return null; } }
+    public java.net.URL getURL(final String columnName) throws SQLException {
+        try {
+            return resultSet.getURL(columnName);
+        } catch (final SQLException e) {
+            handleException(e);
+            return null;
+        }
+    }
 
     @Override
-    public void updateRef(final int columnIndex, final Ref x) throws SQLException
-    { try { resultSet.updateRef(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateRef(final int columnIndex, final Ref x) throws SQLException {
+        try {
+            resultSet.updateRef(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateRef(final String columnName, final Ref x) throws SQLException
-    { try { resultSet.updateRef(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateRef(final String columnName, final Ref x) throws SQLException {
+        try {
+            resultSet.updateRef(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBlob(final int columnIndex, final Blob x) throws SQLException
-    { try { resultSet.updateBlob(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBlob(final int columnIndex, final Blob x) throws SQLException {
+        try {
+            resultSet.updateBlob(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateBlob(final String columnName, final Blob x) throws SQLException
-    { try { resultSet.updateBlob(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateBlob(final String columnName, final Blob x) throws SQLException {
+        try {
+            resultSet.updateBlob(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateClob(final int columnIndex, final Clob x) throws SQLException
-    { try { resultSet.updateClob(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateClob(final int columnIndex, final Clob x) throws SQLException {
+        try {
+            resultSet.updateClob(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateClob(final String columnName, final Clob x) throws SQLException
-    { try { resultSet.updateClob(columnName, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateClob(final String columnName, final Clob x) throws SQLException {
+        try {
+            resultSet.updateClob(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateArray(final int columnIndex, final Array x) throws SQLException
-    { try { resultSet.updateArray(columnIndex, x); } catch (final SQLException e) { handleException(e); } }
+    public void updateArray(final int columnIndex, final Array x) throws SQLException {
+        try {
+            resultSet.updateArray(columnIndex, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
-    public void updateArray(final String columnName, final Array x) throws SQLException
-    { try { resultSet.updateArray(columnName, x); } catch (final SQLException e) { handleException(e); } }
-
+    public void updateArray(final String columnName, final Array x) throws SQLException {
+        try {
+            resultSet.updateArray(columnName, x);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
     public boolean isWrapperFor(final Class<?> iface) throws SQLException {
@@ -799,8 +1548,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public RowId getRowId(final int columnIndex) throws SQLException {
         try {
             return resultSet.getRowId(columnIndex);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -810,8 +1558,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public RowId getRowId(final String columnLabel) throws SQLException {
         try {
             return resultSet.getRowId(columnLabel);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -821,8 +1568,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateRowId(final int columnIndex, final RowId value) throws SQLException {
         try {
             resultSet.updateRowId(columnIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -831,8 +1577,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateRowId(final String columnLabel, final RowId value) throws SQLException {
         try {
             resultSet.updateRowId(columnLabel, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -841,8 +1586,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public int getHoldability() throws SQLException {
         try {
             return resultSet.getHoldability();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return 0;
         }
@@ -852,8 +1596,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public boolean isClosed() throws SQLException {
         try {
             return resultSet.isClosed();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return false;
         }
@@ -863,8 +1606,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNString(final int columnIndex, final String value) throws SQLException {
         try {
             resultSet.updateNString(columnIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -873,8 +1615,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNString(final String columnLabel, final String value) throws SQLException {
         try {
             resultSet.updateNString(columnLabel, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -883,8 +1624,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNClob(final int columnIndex, final NClob value) throws SQLException {
         try {
             resultSet.updateNClob(columnIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -893,8 +1633,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNClob(final String columnLabel, final NClob value) throws SQLException {
         try {
             resultSet.updateNClob(columnLabel, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -903,8 +1642,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public NClob getNClob(final int columnIndex) throws SQLException {
         try {
             return resultSet.getNClob(columnIndex);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -914,8 +1652,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public NClob getNClob(final String columnLabel) throws SQLException {
         try {
             return resultSet.getNClob(columnLabel);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -925,8 +1662,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public SQLXML getSQLXML(final int columnIndex) throws SQLException {
         try {
             return resultSet.getSQLXML(columnIndex);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -936,8 +1672,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public SQLXML getSQLXML(final String columnLabel) throws SQLException {
         try {
             return resultSet.getSQLXML(columnLabel);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -947,8 +1682,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateSQLXML(final int columnIndex, final SQLXML value) throws SQLException {
         try {
             resultSet.updateSQLXML(columnIndex, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -957,8 +1691,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateSQLXML(final String columnLabel, final SQLXML value) throws SQLException {
         try {
             resultSet.updateSQLXML(columnLabel, value);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -967,8 +1700,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public String getNString(final int columnIndex) throws SQLException {
         try {
             return resultSet.getNString(columnIndex);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -978,8 +1710,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public String getNString(final String columnLabel) throws SQLException {
         try {
             return resultSet.getNString(columnLabel);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -989,8 +1720,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public Reader getNCharacterStream(final int columnIndex) throws SQLException {
         try {
             return resultSet.getNCharacterStream(columnIndex);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -1000,109 +1730,108 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public Reader getNCharacterStream(final String columnLabel) throws SQLException {
         try {
             return resultSet.getNCharacterStream(columnLabel);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public void updateNCharacterStream(final int columnIndex, final Reader reader, final long length) throws SQLException {
+    public void updateNCharacterStream(final int columnIndex, final Reader reader, final long length)
+            throws SQLException {
         try {
             resultSet.updateNCharacterStream(columnIndex, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateNCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
+    public void updateNCharacterStream(final String columnLabel, final Reader reader, final long length)
+            throws SQLException {
         try {
             resultSet.updateNCharacterStream(columnLabel, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateAsciiStream(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
+    public void updateAsciiStream(final int columnIndex, final InputStream inputStream, final long length)
+            throws SQLException {
         try {
             resultSet.updateAsciiStream(columnIndex, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateBinaryStream(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
+    public void updateBinaryStream(final int columnIndex, final InputStream inputStream, final long length)
+            throws SQLException {
         try {
             resultSet.updateBinaryStream(columnIndex, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateCharacterStream(final int columnIndex, final Reader reader, final long length) throws SQLException {
+    public void updateCharacterStream(final int columnIndex, final Reader reader, final long length)
+            throws SQLException {
         try {
             resultSet.updateCharacterStream(columnIndex, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateAsciiStream(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
+    public void updateAsciiStream(final String columnLabel, final InputStream inputStream, final long length)
+            throws SQLException {
         try {
             resultSet.updateAsciiStream(columnLabel, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateBinaryStream(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
+    public void updateBinaryStream(final String columnLabel, final InputStream inputStream, final long length)
+            throws SQLException {
         try {
             resultSet.updateBinaryStream(columnLabel, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateCharacterStream(final String columnLabel, final Reader reader, final long length) throws SQLException {
+    public void updateCharacterStream(final String columnLabel, final Reader reader, final long length)
+            throws SQLException {
         try {
             resultSet.updateCharacterStream(columnLabel, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateBlob(final int columnIndex, final InputStream inputStream, final long length) throws SQLException {
+    public void updateBlob(final int columnIndex, final InputStream inputStream, final long length)
+            throws SQLException {
         try {
             resultSet.updateBlob(columnIndex, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void updateBlob(final String columnLabel, final InputStream inputStream, final long length) throws SQLException {
+    public void updateBlob(final String columnLabel, final InputStream inputStream, final long length)
+            throws SQLException {
         try {
             resultSet.updateBlob(columnLabel, inputStream, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1111,8 +1840,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
         try {
             resultSet.updateClob(columnIndex, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1121,8 +1849,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
         try {
             resultSet.updateClob(columnLabel, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1131,8 +1858,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNClob(final int columnIndex, final Reader reader, final long length) throws SQLException {
         try {
             resultSet.updateNClob(columnIndex, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1141,8 +1867,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNClob(final String columnLabel, final Reader reader, final long length) throws SQLException {
         try {
             resultSet.updateNClob(columnLabel, reader, length);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1151,8 +1876,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
         try {
             resultSet.updateNCharacterStream(columnIndex, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1161,8 +1885,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateNCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
         try {
             resultSet.updateNCharacterStream(columnLabel, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1171,8 +1894,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateAsciiStream(final int columnIndex, final InputStream inputStream) throws SQLException {
         try {
             resultSet.updateAsciiStream(columnIndex, inputStream);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1181,8 +1903,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateBinaryStream(final int columnIndex, final InputStream inputStream) throws SQLException {
         try {
             resultSet.updateBinaryStream(columnIndex, inputStream);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1191,8 +1912,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateCharacterStream(final int columnIndex, final Reader reader) throws SQLException {
         try {
             resultSet.updateCharacterStream(columnIndex, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1201,8 +1921,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateAsciiStream(final String columnLabel, final InputStream inputStream) throws SQLException {
         try {
             resultSet.updateAsciiStream(columnLabel, inputStream);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1211,8 +1930,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateBinaryStream(final String columnLabel, final InputStream inputStream) throws SQLException {
         try {
             resultSet.updateBinaryStream(columnLabel, inputStream);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1221,8 +1939,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateCharacterStream(final String columnLabel, final Reader reader) throws SQLException {
         try {
             resultSet.updateCharacterStream(columnLabel, reader);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1231,8 +1948,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     public void updateBlob(final int columnIndex, final InputStre

<TRUNCATED>

[18/50] [abbrv] commons-dbcp git commit: Add missing Javadoc HTML tags.

Posted by gg...@apache.org.
Add missing Javadoc HTML tags.

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

Branch: refs/heads/release
Commit: 95b6b99a4828cdedd8b2dbed51b71eefa5d498e1
Parents: b572ad1
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:56:50 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:56:50 2018 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/95b6b99a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index 606ba94..08ef8c1 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -168,10 +168,12 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
      * delegate that is not a {@code DelegatingConnection},
      * or {@code null} when no non-{@code DelegatingConnection}
      * delegate can be found by traversing this chain.
+     * </p>
      * <p>
      * This method is useful when you may have nested
      * {@code DelegatingConnection}s, and you want to make
      * sure to obtain a "genuine" {@link Connection}.
+     * </p>
      * 
      * @return innermost delegate. 
      */


[06/50] [abbrv] commons-dbcp git commit: Line length 120 and standard formatting.

Posted by gg...@apache.org.
Line length 120 and standard formatting.

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

Branch: refs/heads/release
Commit: e7ee9481ed978b1571fab43fde8da46439e9d503
Parents: 15a5cf8
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:22:46 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:22:46 2018 -0600

----------------------------------------------------------------------
 .../datasources/CPDSConnectionFactory.java      |  99 ++++++-------
 .../datasources/InstanceKeyDataSource.java      |  15 +-
 .../datasources/KeyedCPDSConnectionFactory.java |  17 +--
 .../datasources/PerUserPoolDataSource.java      | 138 +++++++++----------
 .../datasources/PooledConnectionAndInfo.java    |   2 +-
 .../datasources/PooledConnectionManager.java    |  32 +++--
 .../dbcp2/datasources/SharedPoolDataSource.java |  42 +++---
 .../SharedPoolDataSourceFactory.java            |  12 +-
 8 files changed, 162 insertions(+), 195 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
index e3c0d2e..08f75e5 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
@@ -37,17 +37,14 @@ import org.apache.commons.pool2.PooledObjectFactory;
 import org.apache.commons.pool2.impl.DefaultPooledObject;
 
 /**
- * A {@link PooledObjectFactory} that creates
- * {@link org.apache.commons.dbcp2.PoolableConnection PoolableConnection}s.
+ * A {@link PooledObjectFactory} that creates {@link org.apache.commons.dbcp2.PoolableConnection PoolableConnection}s.
  *
  * @since 2.0
  */
 class CPDSConnectionFactory
         implements PooledObjectFactory<PooledConnectionAndInfo>, ConnectionEventListener, PooledConnectionManager {
 
-    private static final String NO_KEY_MESSAGE
-            = "close() was called on a Connection, but "
-            + "I have no record of the underlying PooledConnection.";
+    private static final String NO_KEY_MESSAGE = "close() was called on a Connection, but I have no record of the underlying PooledConnection.";
 
     private final ConnectionPoolDataSource cpds;
     private final String validationQuery;
@@ -59,17 +56,15 @@ class CPDSConnectionFactory
     private long maxConnLifetimeMillis = -1;
 
     /**
-     * Map of PooledConnections for which close events are ignored.
-     * Connections are muted when they are being validated.
+     * Map of PooledConnections for which close events are ignored. Connections are muted when they are being validated.
      */
-    private final Set<PooledConnection> validatingSet =
-            Collections.newSetFromMap(new ConcurrentHashMap<PooledConnection,Boolean>());
+    private final Set<PooledConnection> validatingSet = Collections
+            .newSetFromMap(new ConcurrentHashMap<PooledConnection, Boolean>());
 
     /**
      * Map of PooledConnectionAndInfo instances
      */
-    private final Map<PooledConnection, PooledConnectionAndInfo> pcMap =
-        new ConcurrentHashMap<>();
+    private final Map<PooledConnection, PooledConnectionAndInfo> pcMap = new ConcurrentHashMap<>();
 
     /**
      * Creates a new {@code PoolableConnectionFactory}.
@@ -90,12 +85,9 @@ class CPDSConnectionFactory
      *            The password to use to create connections
      * @since 2.4.0
      */
-    public CPDSConnectionFactory(final ConnectionPoolDataSource cpds,
-                                 final String validationQuery,
-                                 final int validationQueryTimeoutSeconds,
-                                 final boolean rollbackAfterValidation,
-                                 final String userName,
-                                 final char[] userPassword) {
+    public CPDSConnectionFactory(final ConnectionPoolDataSource cpds, final String validationQuery,
+            final int validationQueryTimeoutSeconds, final boolean rollbackAfterValidation, final String userName,
+            final char[] userPassword) {
         this.cpds = cpds;
         this.validationQuery = validationQuery;
         this.validationQueryTimeoutSeconds = validationQueryTimeoutSeconds;
@@ -122,12 +114,9 @@ class CPDSConnectionFactory
      * @param userPassword
      *            The password to use to create connections
      */
-    public CPDSConnectionFactory(final ConnectionPoolDataSource cpds,
-                                 final String validationQuery,
-                                 final int validationQueryTimeoutSeconds,
-                                 final boolean rollbackAfterValidation,
-                                 final String userName,
-                                 final String userPassword) {
+    public CPDSConnectionFactory(final ConnectionPoolDataSource cpds, final String validationQuery,
+            final int validationQueryTimeoutSeconds, final boolean rollbackAfterValidation, final String userName,
+            final String userPassword) {
         this(cpds, validationQuery, validationQueryTimeoutSeconds, rollbackAfterValidation, userName,
                 Utils.toCharArray(userPassword));
     }
@@ -143,8 +132,8 @@ class CPDSConnectionFactory
 
     /**
      *
-     * @param pool the {@link ObjectPool} in which to pool those {@link
-     * Connection}s
+     * @param pool
+     *            the {@link ObjectPool} in which to pool those {@link Connection}s
      */
     public void setPool(final ObjectPool<PooledConnectionAndInfo> pool) {
         this.pool = pool;
@@ -184,7 +173,7 @@ class CPDSConnectionFactory
         doDestroyObject(p.getObject());
     }
 
-    private void doDestroyObject(final PooledConnectionAndInfo pci) throws Exception{
+    private void doDestroyObject(final PooledConnectionAndInfo pci) throws Exception {
         final PooledConnection pc = pci.getPooledConnection();
         pc.removeConnectionEventListener(this);
         pcMap.remove(pc);
@@ -263,10 +252,9 @@ class CPDSConnectionFactory
     // ***********************************************************************
 
     /**
-     * This will be called if the Connection returned by the getConnection
-     * method came from a PooledConnection, and the user calls the close()
-     * method of this connection object. What we need to do here is to
-     * release this PooledConnection from our pool...
+     * This will be called if the Connection returned by the getConnection method came from a PooledConnection, and the
+     * user calls the close() method of this connection object. What we need to do here is to release this
+     * PooledConnection from our pool...
      */
     @Override
     public void connectionClosed(final ConnectionEvent event) {
@@ -282,14 +270,12 @@ class CPDSConnectionFactory
             try {
                 pool.returnObject(pci);
             } catch (final Exception e) {
-                System.err.println("CLOSING DOWN CONNECTION AS IT COULD "
-                        + "NOT BE RETURNED TO THE POOL");
+                System.err.println("CLOSING DOWN CONNECTION AS IT COULD " + "NOT BE RETURNED TO THE POOL");
                 pc.removeConnectionEventListener(this);
                 try {
                     doDestroyObject(pci);
                 } catch (final Exception e2) {
-                    System.err.println("EXCEPTION WHILE DESTROYING OBJECT "
-                            + pci);
+                    System.err.println("EXCEPTION WHILE DESTROYING OBJECT " + pci);
                     e2.printStackTrace();
                 }
             }
@@ -297,16 +283,13 @@ class CPDSConnectionFactory
     }
 
     /**
-     * If a fatal error occurs, close the underlying physical connection so as
-     * not to be returned in the future
+     * If a fatal error occurs, close the underlying physical connection so as not to be returned in the future
      */
     @Override
     public void connectionErrorOccurred(final ConnectionEvent event) {
-        final PooledConnection pc = (PooledConnection)event.getSource();
+        final PooledConnection pc = (PooledConnection) event.getSource();
         if (null != event.getSQLException()) {
-            System.err.println(
-                    "CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR ("
-                    + event.getSQLException() + ")");
+            System.err.println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR (" + event.getSQLException() + ")");
         }
         pc.removeConnectionEventListener(this);
 
@@ -327,10 +310,9 @@ class CPDSConnectionFactory
     // ***********************************************************************
 
     /**
-     * Invalidates the PooledConnection in the pool.  The CPDSConnectionFactory
-     * closes the connection and pool counters are updated appropriately.
-     * Also closes the pool.  This ensures that all idle connections are closed
-     * and connections that are checked out are closed on return.
+     * Invalidates the PooledConnection in the pool. The CPDSConnectionFactory closes the connection and pool counters
+     * are updated appropriately. Also closes the pool. This ensures that all idle connections are closed and
+     * connections that are checked out are closed on return.
      */
     @Override
     public void invalidate(final PooledConnection pc) throws SQLException {
@@ -339,8 +321,8 @@ class CPDSConnectionFactory
             throw new IllegalStateException(NO_KEY_MESSAGE);
         }
         try {
-            pool.invalidateObject(pci);  // Destroy instance and update pool counters
-            pool.close();  // Clear any other instances in this pool and kill others as they come back
+            pool.invalidateObject(pci); // Destroy instance and update pool counters
+            pool.close(); // Clear any other instances in this pool and kill others as they come back
         } catch (final Exception ex) {
             throw new SQLException("Error invalidating connection", ex);
         }
@@ -349,7 +331,8 @@ class CPDSConnectionFactory
     /**
      * Sets the database password used when creating new connections.
      *
-     * @param userPassword new password
+     * @param userPassword
+     *            new password
      */
     public synchronized void setPassword(final char[] userPassword) {
         this.userPassword = userPassword;
@@ -358,7 +341,8 @@ class CPDSConnectionFactory
     /**
      * Sets the database password used when creating new connections.
      *
-     * @param userPassword new password
+     * @param userPassword
+     *            new password
      */
     @Override
     public synchronized void setPassword(final String userPassword) {
@@ -366,19 +350,19 @@ class CPDSConnectionFactory
     }
 
     /**
-     * Sets the maximum lifetime in milliseconds of a connection after which the
-     * connection will always fail activation, passivation and validation.
+     * Sets the maximum lifetime in milliseconds of a connection after which the connection will always fail activation,
+     * passivation and validation.
      *
-     * @param maxConnLifetimeMillis A value of zero or less indicates an
-     *        infinite lifetime. The default value is -1.
+     * @param maxConnLifetimeMillis
+     *            A value of zero or less indicates an infinite lifetime. The default value is -1.
      */
     public void setMaxConnLifetimeMillis(final long maxConnLifetimeMillis) {
         this.maxConnLifetimeMillis = maxConnLifetimeMillis;
     }
 
     /**
-     * Verifies that the user name matches the user whose connections are being managed by this
-     * factory and closes the pool if this is the case; otherwise does nothing.
+     * Verifies that the user name matches the user whose connections are being managed by this factory and closes the
+     * pool if this is the case; otherwise does nothing.
      */
     @Override
     public void closePool(final String userName) throws SQLException {
@@ -394,14 +378,11 @@ class CPDSConnectionFactory
         }
     }
 
-    private void validateLifetime(final PooledObject<PooledConnectionAndInfo> p)
-            throws Exception {
+    private void validateLifetime(final PooledObject<PooledConnectionAndInfo> p) throws Exception {
         if (maxConnLifetimeMillis > 0) {
             final long lifetime = System.currentTimeMillis() - p.getCreateTime();
             if (lifetime > maxConnLifetimeMillis) {
-                throw new Exception(Utils.getMessage(
-                        "connectionFactory.lifetimeExceeded",
-                        Long.valueOf(lifetime),
+                throw new Exception(Utils.getMessage("connectionFactory.lifetimeExceeded", Long.valueOf(lifetime),
                         Long.valueOf(maxConnLifetimeMillis)));
             }
         }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
index f7e6af9..b72a03c 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
@@ -530,7 +530,8 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable
     }
 
     /**
-     * Sets the backend ConnectionPoolDataSource. This property should not be set if using jndi to access the datasource.
+     * Sets the backend ConnectionPoolDataSource. This property should not be set if using jndi to access the
+     * datasource.
      *
      * @param v
      *            Value to assign to connectionPoolDataSource.
@@ -602,9 +603,9 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable
     }
 
     /**
-     * Gets the value of defaultReadOnly, which defines the state of connections handed out from this pool. The value can
-     * be changed on the Connection using Connection.setReadOnly(boolean). The default is <code>null</code> which will
-     * use the default value for the drive.
+     * Gets the value of defaultReadOnly, which defines the state of connections handed out from this pool. The value
+     * can be changed on the Connection using Connection.setReadOnly(boolean). The default is <code>null</code> which
+     * will use the default value for the drive.
      *
      * @return value of defaultReadOnly.
      */
@@ -613,9 +614,9 @@ public abstract class InstanceKeyDataSource implements DataSource, Referenceable
     }
 
     /**
-     * Sets the value of defaultReadOnly, which defines the state of connections handed out from this pool. The value can
-     * be changed on the Connection using Connection.setReadOnly(boolean). The default is <code>null</code> which will
-     * use the default value for the drive.
+     * Sets the value of defaultReadOnly, which defines the state of connections handed out from this pool. The value
+     * can be changed on the Connection using Connection.setReadOnly(boolean). The default is <code>null</code> which
+     * will use the default value for the drive.
      *
      * @param v
      *            Value to assign to defaultReadOnly.

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
index baac0c9..a755ebf 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
@@ -53,7 +53,7 @@ class KeyedCPDSConnectionFactory implements KeyedPooledObjectFactory<UserPassKey
     private final String validationQuery;
     private final int validationQueryTimeoutSeconds;
     private final boolean rollbackAfterValidation;
-    private KeyedObjectPool<UserPassKey,PooledConnectionAndInfo> pool;
+    private KeyedObjectPool<UserPassKey, PooledConnectionAndInfo> pool;
     private long maxConnLifetimeMillis = -1;
 
     /**
@@ -81,17 +81,15 @@ class KeyedCPDSConnectionFactory implements KeyedPooledObjectFactory<UserPassKey
      * @param rollbackAfterValidation
      *            whether a rollback should be issued after {@link #validateObject validating} {@link Connection}s.
      */
-    public KeyedCPDSConnectionFactory(final ConnectionPoolDataSource cpds,
-                                      final String validationQuery,
-                                      final int validationQueryTimeoutSeconds,
-                                      final boolean rollbackAfterValidation) {
+    public KeyedCPDSConnectionFactory(final ConnectionPoolDataSource cpds, final String validationQuery,
+            final int validationQueryTimeoutSeconds, final boolean rollbackAfterValidation) {
         this.cpds = cpds;
         this.validationQuery = validationQuery;
         this.validationQueryTimeoutSeconds = validationQueryTimeoutSeconds;
         this.rollbackAfterValidation = rollbackAfterValidation;
     }
 
-    public void setPool(final KeyedObjectPool<UserPassKey,PooledConnectionAndInfo> pool) {
+    public void setPool(final KeyedObjectPool<UserPassKey, PooledConnectionAndInfo> pool) {
         this.pool = pool;
     }
 
@@ -341,14 +339,11 @@ class KeyedCPDSConnectionFactory implements KeyedPooledObjectFactory<UserPassKey
         }
     }
 
-    private void validateLifetime(final PooledObject<PooledConnectionAndInfo> p)
-            throws Exception {
+    private void validateLifetime(final PooledObject<PooledConnectionAndInfo> p) throws Exception {
         if (maxConnLifetimeMillis > 0) {
             final long lifetime = System.currentTimeMillis() - p.getCreateTime();
             if (lifetime > maxConnLifetimeMillis) {
-                throw new Exception(Utils.getMessage(
-                        "connectionFactory.lifetimeExceeded",
-                        Long.valueOf(lifetime),
+                throw new Exception(Utils.getMessage("connectionFactory.lifetimeExceeded", Long.valueOf(lifetime),
                         Long.valueOf(maxConnLifetimeMillis)));
             }
         }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
index afabcd1..1087b37 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/PerUserPoolDataSource.java
@@ -36,22 +36,21 @@ import org.apache.commons.pool2.ObjectPool;
 import org.apache.commons.pool2.impl.GenericObjectPool;
 
 /**
- * <p>A pooling <code>DataSource</code> appropriate for deployment within
- * J2EE environment.  There are many configuration options, most of which are
- * defined in the parent class.  This datasource uses individual pools per
- * user, and some properties can be set specifically for a given user, if the
- * deployment environment can support initialization of mapped properties.
- * So for example, a pool of admin or write-access Connections can be
- * guaranteed a certain number of connections, separate from a maximum
- * set for users with read-only connections.</p>
+ * <p>
+ * A pooling <code>DataSource</code> appropriate for deployment within J2EE environment. There are many configuration
+ * options, most of which are defined in the parent class. This datasource uses individual pools per user, and some
+ * properties can be set specifically for a given user, if the deployment environment can support initialization of
+ * mapped properties. So for example, a pool of admin or write-access Connections can be guaranteed a certain number of
+ * connections, separate from a maximum set for users with read-only connections.
+ * </p>
  *
- * <p>User passwords can be changed without re-initializing the datasource.
- * When a <code>getConnection(userName, password)</code> request is processed
- * with a password that is different from those used to create connections in
- * the pool associated with <code>userName</code>, an attempt is made to create
- * a new connection using the supplied password and if this succeeds, the
- * existing pool is cleared and a new pool is created for connections using the
- * new password.</p>
+ * <p>
+ * User passwords can be changed without re-initializing the datasource. When a
+ * <code>getConnection(userName, password)</code> request is processed with a password that is different from those used
+ * to create connections in the pool associated with <code>userName</code>, an attempt is made to create a new
+ * connection using the supplied password and if this succeeds, the existing pool is cleared and a new pool is created
+ * for connections using the new password.
+ * </p>
  *
  * @since 2.0
  */
@@ -154,7 +153,8 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     /**
      * Gets the number of active connections in the pool for a given user.
      *
-     * @param userName The user name key.
+     * @param userName
+     *            The user name key.
      * @return The user specific value.
      */
     @SuppressWarnings("resource")
@@ -172,11 +172,11 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         return getNumIdle(null);
     }
 
-
     /**
      * Gets the number of idle connections in the pool for a given user.
      *
-     * @param userName The user name key.
+     * @param userName
+     *            The user name key.
      * @return The user specific value.
      */
     @SuppressWarnings("resource")
@@ -219,7 +219,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         return value;
     }
 
-
     /**
      * Gets the user specific default value for {@link Connection#setReadOnly(boolean)} for the specified user's pool.
      *
@@ -270,7 +269,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         return value;
     }
 
-
     /**
      * Gets the user specific value for {@link GenericObjectPool#getLifo()} for the specified user's pool or the default
      * if no user specific value is defined.
@@ -328,7 +326,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         return value.intValue();
     }
 
-
     /**
      * Gets the user specific value for {@link GenericObjectPool#getMaxWaitMillis()} for the specified user's pool or
      * the default if no user specific value is defined.
@@ -386,7 +383,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         return value.intValue();
     }
 
-
     /**
      * Gets the user specific value for {@link GenericObjectPool#getNumTestsPerEvictionRun()} for the specified user's
      * pool or the default if no user specific value is defined.
@@ -444,7 +440,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         return value.booleanValue();
     }
 
-
     /**
      * Gets the user specific value for {@link GenericObjectPool#getTestOnCreate()} for the specified user's pool or the
      * default if no user specific value is defined.
@@ -534,9 +529,8 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     }
 
     @Override
-    protected PooledConnectionAndInfo
-        getPooledConnectionAndInfo(final String userName, final String password)
-                    throws SQLException {
+    protected PooledConnectionAndInfo getPooledConnectionAndInfo(final String userName, final String password)
+            throws SQLException {
 
         final PoolKey key = getPoolKey(userName);
         ObjectPool<PooledConnectionAndInfo> pool;
@@ -589,14 +583,14 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     /**
      * Creates a pool key from the provided parameters.
      *
-     * @param userName  User name
-     * @return  The pool key
+     * @param userName
+     *            User name
+     * @return The pool key
      */
     private PoolKey getPoolKey(final String userName) {
         return new PoolKey(getDataSourceName(), userName);
     }
 
-
     /**
      * Returns a <code>PerUserPoolDataSource</code> {@link Reference}.
      */
@@ -610,9 +604,12 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     /**
      * Supports Serialization interface.
      *
-     * @param in a <code>java.io.ObjectInputStream</code> value
-     * @throws IOException if an error occurs
-     * @throws ClassNotFoundException if an error occurs
+     * @param in
+     *            a <code>java.io.ObjectInputStream</code> value
+     * @throws IOException
+     *             if an error occurs
+     * @throws ClassNotFoundException
+     *             if an error occurs
      */
     private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
         try {
@@ -677,8 +674,10 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     /**
      * Sets a user specific value for {@link GenericObjectPool#getBlockWhenExhausted()} for the specified user's pool.
      *
-     * @param userName The user name key.
-     * @param value The user specific value.
+     * @param userName
+     *            The user name key.
+     * @param value
+     *            The user specific value.
      */
     public void setPerUserBlockWhenExhausted(final String userName, final Boolean value) {
         assertInitializationAllowed();
@@ -688,7 +687,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserBlockWhenExhausted.put(userName, value);
     }
 
-    void setPerUserDefaultAutoCommit(final Map<String,Boolean> userDefaultAutoCommit) {
+    void setPerUserDefaultAutoCommit(final Map<String, Boolean> userDefaultAutoCommit) {
         assertInitializationAllowed();
         if (perUserDefaultAutoCommit == null) {
             perUserDefaultAutoCommit = createMap();
@@ -714,7 +713,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserDefaultAutoCommit.put(userName, value);
     }
 
-
     void setPerUserDefaultReadOnly(final Map<String, Boolean> userDefaultReadOnly) {
         assertInitializationAllowed();
         if (perUserDefaultReadOnly == null) {
@@ -741,8 +739,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserDefaultReadOnly.put(userName, value);
     }
 
-    void setPerUserDefaultTransactionIsolation(
-            final Map<String, Integer> userDefaultTransactionIsolation) {
+    void setPerUserDefaultTransactionIsolation(final Map<String, Integer> userDefaultTransactionIsolation) {
         assertInitializationAllowed();
         if (perUserDefaultTransactionIsolation == null) {
             perUserDefaultTransactionIsolation = new HashMap<>();
@@ -752,7 +749,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserDefaultTransactionIsolation.putAll(userDefaultTransactionIsolation);
     }
 
-
     /**
      * Sets a user specific default value for {@link Connection#setTransactionIsolation(int)} for the specified user's
      * pool.
@@ -770,8 +766,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserDefaultTransactionIsolation.put(userName, value);
     }
 
-    void setPerUserEvictionPolicyClassName(
-            final Map<String,String> userDefaultEvictionPolicyClassName) {
+    void setPerUserEvictionPolicyClassName(final Map<String, String> userDefaultEvictionPolicyClassName) {
         assertInitializationAllowed();
         if (perUserEvictionPolicyClassName == null) {
             perUserEvictionPolicyClassName = new HashMap<>();
@@ -834,7 +829,6 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserMaxIdle.putAll(userDefaultMaxIdle);
     }
 
-
     /**
      * Sets a user specific value for {@link GenericObjectPool#getMaxIdle()} for the specified user's pool.
      *
@@ -877,9 +871,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserMaxTotal.put(userName, value);
     }
 
-
-    void setPerUserMaxWaitMillis(
-            final Map<String,Long> userDefaultMaxWaitMillis) {
+    void setPerUserMaxWaitMillis(final Map<String, Long> userDefaultMaxWaitMillis) {
         assertInitializationAllowed();
         if (perUserMaxWaitMillis == null) {
             perUserMaxWaitMillis = new HashMap<>();
@@ -905,19 +897,16 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserMaxWaitMillis.put(userName, value);
     }
 
-    void setPerUserMinEvictableIdleTimeMillis(
-            final Map<String,Long> userDefaultMinEvictableIdleTimeMillis) {
+    void setPerUserMinEvictableIdleTimeMillis(final Map<String, Long> userDefaultMinEvictableIdleTimeMillis) {
         assertInitializationAllowed();
         if (perUserMinEvictableIdleTimeMillis == null) {
             perUserMinEvictableIdleTimeMillis = new HashMap<>();
         } else {
             perUserMinEvictableIdleTimeMillis.clear();
         }
-        perUserMinEvictableIdleTimeMillis.putAll(
-                userDefaultMinEvictableIdleTimeMillis);
+        perUserMinEvictableIdleTimeMillis.putAll(userDefaultMinEvictableIdleTimeMillis);
     }
 
-
     /**
      * Sets a user specific value for {@link GenericObjectPool#getMinEvictableIdleTimeMillis()} for the specified user's
      * pool.
@@ -961,9 +950,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserMinIdle.put(userName, value);
     }
 
-
-    void setPerUserNumTestsPerEvictionRun(
-            final Map<String, Integer> userDefaultNumTestsPerEvictionRun) {
+    void setPerUserNumTestsPerEvictionRun(final Map<String, Integer> userDefaultNumTestsPerEvictionRun) {
         assertInitializationAllowed();
         if (perUserNumTestsPerEvictionRun == null) {
             perUserNumTestsPerEvictionRun = new HashMap<>();
@@ -990,8 +977,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserNumTestsPerEvictionRun.put(userName, value);
     }
 
-    void setPerUserSoftMinEvictableIdleTimeMillis(
-            final Map<String,Long> userDefaultSoftMinEvictableIdleTimeMillis) {
+    void setPerUserSoftMinEvictableIdleTimeMillis(final Map<String, Long> userDefaultSoftMinEvictableIdleTimeMillis) {
         assertInitializationAllowed();
         if (perUserSoftMinEvictableIdleTimeMillis == null) {
             perUserSoftMinEvictableIdleTimeMillis = new HashMap<>();
@@ -1044,7 +1030,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserTestOnBorrow.put(userName, value);
     }
 
-    void setPerUserTestOnCreate(final Map<String,Boolean> userDefaultTestOnCreate) {
+    void setPerUserTestOnCreate(final Map<String, Boolean> userDefaultTestOnCreate) {
         assertInitializationAllowed();
         if (perUserTestOnCreate == null) {
             perUserTestOnCreate = createMap();
@@ -1054,12 +1040,13 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserTestOnCreate.putAll(userDefaultTestOnCreate);
     }
 
-
     /**
      * Sets a user specific value for {@link GenericObjectPool#getTestOnCreate()} for the specified user's pool.
      *
-     * @param userName The user name key.
-     * @param value The user specific value.
+     * @param userName
+     *            The user name key.
+     * @param value
+     *            The user specific value.
      */
     public void setPerUserTestOnCreate(final String userName, final Boolean value) {
         assertInitializationAllowed();
@@ -1069,8 +1056,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserTestOnCreate.put(userName, value);
     }
 
-    void setPerUserTestOnReturn(
-            final Map<String,Boolean> userDefaultTestOnReturn) {
+    void setPerUserTestOnReturn(final Map<String, Boolean> userDefaultTestOnReturn) {
         assertInitializationAllowed();
         if (perUserTestOnReturn == null) {
             perUserTestOnReturn = createMap();
@@ -1083,8 +1069,10 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     /**
      * Sets a user specific value for {@link GenericObjectPool#getTestOnReturn()} for the specified user's pool.
      *
-     * @param userName The user name key.
-     * @param value The user specific value.
+     * @param userName
+     *            The user name key.
+     * @param value
+     *            The user specific value.
      */
     public void setPerUserTestOnReturn(final String userName, final Boolean value) {
         assertInitializationAllowed();
@@ -1094,8 +1082,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
         perUserTestOnReturn.put(userName, value);
     }
 
-    void setPerUserTestWhileIdle(
-            final Map<String,Boolean> userDefaultTestWhileIdle) {
+    void setPerUserTestWhileIdle(final Map<String, Boolean> userDefaultTestWhileIdle) {
         assertInitializationAllowed();
         if (perUserTestWhileIdle == null) {
             perUserTestWhileIdle = createMap();
@@ -1108,8 +1095,10 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     /**
      * Sets a user specific value for {@link GenericObjectPool#getTestWhileIdle()} for the specified user's pool.
      *
-     * @param userName The user name key.
-     * @param value The user specific value.
+     * @param userName
+     *            The user name key.
+     * @param value
+     *            The user specific value.
      */
     public void setPerUserTestWhileIdle(final String userName, final Boolean value) {
         assertInitializationAllowed();
@@ -1133,8 +1122,10 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
      * Sets a user specific value for {@link GenericObjectPool#getTimeBetweenEvictionRunsMillis ()} for the specified
      * user's pool.
      *
-     * @param userName The user name key.
-     * @param value The user specific value.
+     * @param userName
+     *            The user name key.
+     * @param value
+     *            The user specific value.
      */
     public void setPerUserTimeBetweenEvictionRunsMillis(final String userName, final Long value) {
         assertInitializationAllowed();
@@ -1145,8 +1136,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
     }
 
     @Override
-    protected void setupDefaults(final Connection con, final String userName)
-        throws SQLException {
+    protected void setupDefaults(final Connection con, final String userName) throws SQLException {
         Boolean defaultAutoCommit = isDefaultAutoCommit();
         if (userName != null) {
             final Boolean userMax = getPerUserDefaultAutoCommit(userName);
@@ -1171,8 +1161,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
             }
         }
 
-        if (defaultAutoCommit != null &&
-                con.getAutoCommit() != defaultAutoCommit.booleanValue()) {
+        if (defaultAutoCommit != null && con.getAutoCommit() != defaultAutoCommit.booleanValue()) {
             con.setAutoCommit(defaultAutoCommit.booleanValue());
         }
 
@@ -1180,8 +1169,7 @@ public class PerUserPoolDataSource extends InstanceKeyDataSource {
             con.setTransactionIsolation(defaultTransactionIsolation);
         }
 
-        if (defaultReadOnly != null &&
-                con.isReadOnly() != defaultReadOnly.booleanValue()) {
+        if (defaultReadOnly != null && con.isReadOnly() != defaultReadOnly.booleanValue()) {
             con.setReadOnly(defaultReadOnly.booleanValue());
         }
     }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java b/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
index 68b0ff4..bd1a35e 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionAndInfo.java
@@ -48,7 +48,7 @@ final class PooledConnectionAndInfo {
      */
     @Deprecated
     PooledConnectionAndInfo(final PooledConnection pc, final String userName, final String userPassword) {
-        this(pc,  userName, Utils.toCharArray(userPassword));
+        this(pc, userName, Utils.toCharArray(userPassword));
     }
 
     PooledConnection getPooledConnection() {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java b/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java
index dfb0080..2959f06 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/PooledConnectionManager.java
@@ -29,34 +29,38 @@ import javax.sql.PooledConnection;
 interface PooledConnectionManager {
 
     /**
-     * Closes the PooledConnection and remove it from the connection pool
-     * to which it belongs, adjusting pool counters.
+     * Closes the PooledConnection and remove it from the connection pool to which it belongs, adjusting pool counters.
      *
-     * @param pc PooledConnection to be invalidated
-     * @throws SQLException if an SQL error occurs closing the connection
+     * @param pc
+     *            PooledConnection to be invalidated
+     * @throws SQLException
+     *             if an SQL error occurs closing the connection
      */
     void invalidate(PooledConnection pc) throws SQLException;
 
-//    /**
-//     * Sets the database password used when creating connections.
-//     *
-//     * @param password password used when authenticating to the database
-//     * @since 3.0.0
-//     */
-//    void setPassword(char[] password);
+    // /**
+    // * Sets the database password used when creating connections.
+    // *
+    // * @param password password used when authenticating to the database
+    // * @since 3.0.0
+    // */
+    // void setPassword(char[] password);
 
     /**
      * Sets the database password used when creating connections.
      *
-     * @param password password used when authenticating to the database
+     * @param password
+     *            password used when authenticating to the database
      */
     void setPassword(String password);
 
     /**
      * Closes the connection pool associated with the given user.
      *
-     * @param userName user name
-     * @throws SQLException if an error occurs closing idle connections in the pool
+     * @param userName
+     *            user name
+     * @throws SQLException
+     *             if an error occurs closing idle connections in the pool
      */
     void closePool(String userName) throws SQLException;
 

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
index f7b7c3e..cf3e556 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSource.java
@@ -32,18 +32,19 @@ import org.apache.commons.pool2.impl.GenericKeyedObjectPool;
 import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
 
 /**
- * <p>A pooling <code>DataSource</code> appropriate for deployment within
- * J2EE environment.  There are many configuration options, most of which are
- * defined in the parent class. All users (based on user name) share a single
- * maximum number of Connections in this data source.</p>
+ * <p>
+ * A pooling <code>DataSource</code> appropriate for deployment within J2EE environment. There are many configuration
+ * options, most of which are defined in the parent class. All users (based on user name) share a single maximum number
+ * of Connections in this data source.
+ * </p>
  *
- * <p>User passwords can be changed without re-initializing the data source.
- * When a <code>getConnection(user name, password)</code> request is processed
- * with a password that is different from those used to create connections in the
- * pool associated with <code>user name</code>, an attempt is made to create a
- * new connection using the supplied password and if this succeeds, idle connections
- * created using the old password are destroyed and new connections are created
- * using the new password.</p>
+ * <p>
+ * User passwords can be changed without re-initializing the data source. When a
+ * <code>getConnection(user name, password)</code> request is processed with a password that is different from those
+ * used to create connections in the pool associated with <code>user name</code>, an attempt is made to create a new
+ * connection using the supplied password and if this succeeds, idle connections created using the old password are
+ * destroyed and new connections are created using the new password.
+ * </p>
  *
  * @since 2.0
  */
@@ -54,7 +55,7 @@ public class SharedPoolDataSource extends InstanceKeyDataSource {
     // Pool properties
     private int maxTotal = GenericKeyedObjectPoolConfig.DEFAULT_MAX_TOTAL;
 
-    private transient KeyedObjectPool<UserPassKey,PooledConnectionAndInfo> pool;
+    private transient KeyedObjectPool<UserPassKey, PooledConnectionAndInfo> pool;
     private transient KeyedCPDSConnectionFactory factory;
 
     /**
@@ -75,7 +76,6 @@ public class SharedPoolDataSource extends InstanceKeyDataSource {
         InstanceKeyDataSourceFactory.removeInstance(getInstanceKey());
     }
 
-
     // -------------------------------------------------------------------
     // Properties
 
@@ -91,14 +91,14 @@ public class SharedPoolDataSource extends InstanceKeyDataSource {
     /**
      * Sets {@link GenericKeyedObjectPool#getMaxTotal()} for this pool.
      *
-     * @param maxTotal {@link GenericKeyedObjectPool#getMaxTotal()} for this pool.
+     * @param maxTotal
+     *            {@link GenericKeyedObjectPool#getMaxTotal()} for this pool.
      */
     public void setMaxTotal(final int maxTotal) {
         assertInitializationAllowed();
         this.maxTotal = maxTotal;
     }
 
-
     // ----------------------------------------------------------------------
     // Instrumentation Methods
 
@@ -150,7 +150,7 @@ public class SharedPoolDataSource extends InstanceKeyDataSource {
     }
 
     @Override
-    protected PooledConnectionManager getConnectionManager(final UserPassKey upkey)  {
+    protected PooledConnectionManager getConnectionManager(final UserPassKey upkey) {
         return factory;
     }
 
@@ -218,9 +218,12 @@ public class SharedPoolDataSource extends InstanceKeyDataSource {
     /**
      * Supports Serialization interface.
      *
-     * @param in a <code>java.io.ObjectInputStream</code> value
-     * @throws IOException if an error occurs
-     * @throws ClassNotFoundException if an error occurs
+     * @param in
+     *            a <code>java.io.ObjectInputStream</code> value
+     * @throws IOException
+     *             if an error occurs
+     * @throws ClassNotFoundException
+     *             if an error occurs
      */
     private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
         try {
@@ -233,4 +236,3 @@ public class SharedPoolDataSource extends InstanceKeyDataSource {
         }
     }
 }
-

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e7ee9481/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java
index 84a87b1..8a75287 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/SharedPoolDataSourceFactory.java
@@ -22,13 +22,11 @@ import javax.naming.Reference;
 
 /**
  * A JNDI ObjectFactory which creates <code>SharedPoolDataSource</code>s
+ *
  * @since 2.0
  */
-public class SharedPoolDataSourceFactory
-    extends InstanceKeyDataSourceFactory
-{
-    private static final String SHARED_POOL_CLASSNAME =
-        SharedPoolDataSource.class.getName();
+public class SharedPoolDataSourceFactory extends InstanceKeyDataSourceFactory {
+    private static final String SHARED_POOL_CLASSNAME = SharedPoolDataSource.class.getName();
 
     @Override
     protected boolean isCorrectClass(final String className) {
@@ -40,10 +38,8 @@ public class SharedPoolDataSourceFactory
         final SharedPoolDataSource spds = new SharedPoolDataSource();
         final RefAddr ra = ref.get("maxTotal");
         if (ra != null && ra.getContent() != null) {
-            spds.setMaxTotal(
-                Integer.parseInt(ra.getContent().toString()));
+            spds.setMaxTotal(Integer.parseInt(ra.getContent().toString()));
         }
         return spds;
     }
 }
-


[41/50] [abbrv] commons-dbcp git commit: Javadoc.

Posted by gg...@apache.org.
Javadoc.

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

Branch: refs/heads/release
Commit: 0047005da62e887eb4f1784b5890e0aac6ad89b3
Parents: d5a2443
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Jun 12 08:18:24 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Jun 12 08:18:24 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/commons/dbcp2/PStmtKey.java | 36 +++++++++++++++-----
 1 file changed, 28 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0047005d/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
index c70c3b6..aba3acc 100644
--- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
+++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
@@ -31,31 +31,51 @@ import org.apache.commons.dbcp2.PoolingConnection.StatementType;
  */
 public class PStmtKey {
 
-    /** SQL defining Prepared or Callable Statement */
+    /**
+     * SQL defining Prepared or Callable Statement
+     */
     private final String sql;
 
-    /** Result set type */
+    /**
+     * Result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>, <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>,
+     * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>.
+     */
     private final Integer resultSetType;
 
-    /** Result set concurrency */
+    /**
+     * Result set concurrency. A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
+     * <code>ResultSet.CONCUR_UPDATABLE</code>.
+     */
     private final Integer resultSetConcurrency;
 
-    /** Result set holdability */
+    /**
+     * Result set holdability. One of the following <code>ResultSet</code> constants:
+     * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>.
+     */
     private final Integer resultSetHoldability;
 
     /** Database catalog */
     private final String catalog;
 
-    /** Auto generated keys */
+    /**
+     * A flag indicating whether auto-generated keys should be returned; one of
+     * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>.
+     */
     private final Integer autoGeneratedKeys;
 
-    /** column indexes */
+    /**
+     * An array of column indexes indicating the columns that should be returned from the inserted row or rows.
+     */
     private final int[] columnIndexes;
 
-    /** column names */
+    /**
+     * An array of column names indicating the columns that should be returned from the inserted row or rows.
+     */
     private final String[] columnNames;
 
-    /** Statement type */
+    /**
+     * Statement type, prepared or callable.
+     */
     private final StatementType statementType;
 
     /** Statement builder */


[32/50] [abbrv] commons-dbcp git commit: Better description of time scale.

Posted by gg...@apache.org.
Better description of time scale.

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

Branch: refs/heads/release
Commit: 8856608a047f389a40f6d1f409983de139b35850
Parents: 91dc994
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:46:38 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:46:38 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/AbandonedTrace.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/8856608a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
index a53b360..56ed7e9 100644
--- a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
+++ b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
@@ -68,9 +68,9 @@ public class AbandonedTrace implements TrackedUse {
     }
 
     /**
-     * Gets the last time this object was used in ms.
+     * Gets the last time this object was used in milliseconds.
      *
-     * @return long time in ms
+     * @return long time in milliseconds
      */
     @Override
     public long getLastUsed() {
@@ -78,20 +78,20 @@ public class AbandonedTrace implements TrackedUse {
     }
 
     /**
-     * Sets the time this object was last used to the current time in ms.
+     * Sets the time this object was last used to the current time in milliseconds.
      */
     protected void setLastUsed() {
         lastUsed = System.currentTimeMillis();
     }
 
     /**
-     * Sets the time in ms this object was last used.
+     * Sets the time in milliseconds this object was last used.
      *
-     * @param time
-     *            time in ms
+     * @param lastUsedMillis
+     *            time in milliseconds
      */
-    protected void setLastUsed(final long time) {
-        lastUsed = time;
+    protected void setLastUsed(final long lastUsedMillis) {
+        lastUsed = lastUsedMillis;
     }
 
     /**


[03/50] [abbrv] commons-dbcp git commit: Javadoc.

Posted by gg...@apache.org.
Javadoc.

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

Branch: refs/heads/release
Commit: a3ff0a8f0f2859169af38424d9f061fecd1e3a93
Parents: 8672c35
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:09:38 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:09:38 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/DelegatingCallableStatement.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/a3ff0a8f/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
index 9a1474c..978467a 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
@@ -41,16 +41,18 @@ import java.util.Map;
  * <p>
  * All of the methods from the {@link CallableStatement} interface simply call the corresponding method on the
  * "delegate" provided in my constructor.
+ * </p>
  * <p>
  * Extends AbandonedTrace to implement Statement tracking and logging of code which created the Statement. Tracking the
  * Statement ensures that the Connection which created it can close any open Statement's on Connection close.
+ * </p>
  *
  * @since 2.0
  */
 public class DelegatingCallableStatement extends DelegatingPreparedStatement implements CallableStatement {
 
     /**
-     * Create a wrapper for the Statement which traces this Statement to the Connection which created it and the code
+     * Creates a wrapper for the Statement which traces this Statement to the Connection which created it and the code
      * which created it.
      *
      * @param c


[25/50] [abbrv] commons-dbcp git commit: Add missing Javadoc tags.

Posted by gg...@apache.org.
Add missing Javadoc tags.

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

Branch: refs/heads/release
Commit: f20a569806d5cb3f5ccaf1cfb54946867b78cc91
Parents: 5ccf73a
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:08:01 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:08:01 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/PoolableConnectionFactory.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/f20a5698/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
index 2f5288b..41d74a5 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
@@ -178,6 +178,9 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
     /**
      * Sets the maximum lifetime in milliseconds of a connection after which the connection will always fail activation,
      * passivation and validation. A value of zero or less indicates an infinite lifetime. The default value is -1.
+     * 
+     * @param maxConnLifetimeMillis
+     *            The maximum lifetime in milliseconds.
      */
     public void setMaxConnLifetimeMillis(final long maxConnLifetimeMillis) {
         this.maxConnLifetimeMillis = maxConnLifetimeMillis;
@@ -230,8 +233,9 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
     }
 
     /**
-     * @see #getDisconnectionSqlCodes()
      * @param disconnectionSqlCodes
+     *            The disconnection SQL codes.
+     * @see #getDisconnectionSqlCodes()
      * @since 2.1
      */
     public void setDisconnectionSqlCodes(final Collection<String> disconnectionSqlCodes) {


[33/50] [abbrv] commons-dbcp git commit: Better description of time scale.

Posted by gg...@apache.org.
Better description of time scale.

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

Branch: refs/heads/release
Commit: 18e6a973234edce2e46a5c4fd99ab890e8594b31
Parents: 8856608
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:47:23 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:47:23 2018 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/18e6a973/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
index 56ed7e9..48101f2 100644
--- a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
+++ b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
@@ -38,7 +38,7 @@ public class AbandonedTrace implements TrackedUse {
     private final List<WeakReference<AbandonedTrace>> traceList = new ArrayList<>();
 
     /** Last time this connection was used */
-    private volatile long lastUsed = 0;
+    private volatile long lastUsedMillis = 0;
 
     /**
      * Create a new AbandonedTrace without config and without doing abandoned tracing.
@@ -74,14 +74,14 @@ public class AbandonedTrace implements TrackedUse {
      */
     @Override
     public long getLastUsed() {
-        return lastUsed;
+        return lastUsedMillis;
     }
 
     /**
      * Sets the time this object was last used to the current time in milliseconds.
      */
     protected void setLastUsed() {
-        lastUsed = System.currentTimeMillis();
+        lastUsedMillis = System.currentTimeMillis();
     }
 
     /**
@@ -91,7 +91,7 @@ public class AbandonedTrace implements TrackedUse {
      *            time in milliseconds
      */
     protected void setLastUsed(final long lastUsedMillis) {
-        lastUsed = lastUsedMillis;
+        this.lastUsedMillis = lastUsedMillis;
     }
 
     /**


[12/50] [abbrv] commons-dbcp git commit: No need for an ivar here.

Posted by gg...@apache.org.
No need for an ivar here.

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

Branch: refs/heads/release
Commit: f433a99608baf7ce378478ad212754e9a386d5b5
Parents: 0a928ca
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:45:26 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:45:26 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/commons/dbcp2/managed/ManagedDataSource.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/f433a996/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java b/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
index a73db72..5e3b784 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
@@ -77,8 +77,6 @@ public class ManagedDataSource<C extends Connection> extends PoolingDataSource<C
             throw new IllegalStateException("TransactionRegistry has not been set");
         }
 
-        final Connection connection = new ManagedConnection<>(getPool(), transactionRegistry,
-                isAccessToUnderlyingConnectionAllowed());
-        return connection;
+        return new ManagedConnection<>(getPool(), transactionRegistry, isAccessToUnderlyingConnectionAllowed());
     }
 }


[44/50] [abbrv] commons-dbcp git commit: Format XML.

Posted by gg...@apache.org.
Format XML.

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

Branch: refs/heads/release
Commit: e183847a17f944776ef8230ff6f0c5a06263b9d8
Parents: f283f4c
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Jun 12 09:18:15 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Jun 12 09:18:15 2018 -0600

----------------------------------------------------------------------
 src/site/xdoc/guide/classdiagrams.xml    | 58 +++++++++++++--------------
 src/site/xdoc/guide/index.xml            | 50 ++++++++++++-----------
 src/site/xdoc/guide/sequencediagrams.xml | 52 ++++++++++++------------
 3 files changed, 82 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e183847a/src/site/xdoc/guide/classdiagrams.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/guide/classdiagrams.xml b/src/site/xdoc/guide/classdiagrams.xml
index 8282490..d616ea2 100644
--- a/src/site/xdoc/guide/classdiagrams.xml
+++ b/src/site/xdoc/guide/classdiagrams.xml
@@ -1,44 +1,44 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
- <!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
+  the License. You may obtain a copy of the License at
 
-       http://www.apache.org/licenses/LICENSE-2.0
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-  -->
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <document>
 
- <properties>
-  <title>Class Diagrams</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
+  <properties>
+    <title>Class Diagrams</title>
+    <author email="dev@commons.apache.org">Commons Documentation Team</author>
+  </properties>
 
- <body>
+  <body>
 
-<section name="PoolingDataSource">
-<img src="../images/uml/PoolingDataSource.gif"/>
-</section>
+    <section name="PoolingDataSource">
+      <img src="../images/uml/PoolingDataSource.gif" />
+    </section>
 
-<section name="PoolingConnection">
-<img src="../images/uml/PoolingConnection.gif"/>
-</section>
+    <section name="PoolingConnection">
+      <img src="../images/uml/PoolingConnection.gif" />
+    </section>
 
-<section name="Delegating">
-<img src="../images/uml/Delegating.gif"/>
-</section>
+    <section name="Delegating">
+      <img src="../images/uml/Delegating.gif" />
+    </section>
 
-<section name="AbandonedObjectPool">
-<img src="../images/uml/AbandonedObjectPool.gif"/>
-</section>
+    <section name="AbandonedObjectPool">
+      <img src="../images/uml/AbandonedObjectPool.gif" />
+    </section>
 
-</body>
+  </body>
 </document>

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e183847a/src/site/xdoc/guide/index.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/guide/index.xml b/src/site/xdoc/guide/index.xml
index 3c9c3b5..d9d55af 100644
--- a/src/site/xdoc/guide/index.xml
+++ b/src/site/xdoc/guide/index.xml
@@ -1,36 +1,40 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
- <!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
+  the License. You may obtain a copy of the License at
 
-       http://www.apache.org/licenses/LICENSE-2.0
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-  -->
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <document>
 
- <properties>
-  <title>Developers Guide</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
+  <properties>
+    <title>Developers Guide</title>
+    <author email="dev@commons.apache.org">Commons Documentation Team</author>
+  </properties>
 
- <body>
+  <body>
 
-<section name="BasicDataSource">
-<center><img src="../images/uml/BasicDataSource.gif"/></center>
-</section>
+    <section name="BasicDataSource">
+      <center>
+        <img src="../images/uml/BasicDataSource.gif" />
+      </center>
+    </section>
 
-<section name="ConnectionFactory">
-<center><img src="../images/uml/ConnectionFactory.gif"/></center>
-</section>
+    <section name="ConnectionFactory">
+      <center>
+        <img src="../images/uml/ConnectionFactory.gif" />
+      </center>
+    </section>
 
-</body>
+  </body>
 </document>

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e183847a/src/site/xdoc/guide/sequencediagrams.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/guide/sequencediagrams.xml b/src/site/xdoc/guide/sequencediagrams.xml
index 4c0ba5d..4b5bca5 100644
--- a/src/site/xdoc/guide/sequencediagrams.xml
+++ b/src/site/xdoc/guide/sequencediagrams.xml
@@ -1,40 +1,40 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
- <!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements. See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
+  the License. You may obtain a copy of the License at
 
-       http://www.apache.org/licenses/LICENSE-2.0
+  http://www.apache.org/licenses/LICENSE-2.0
 
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-  -->
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
 <document>
 
- <properties>
-  <title>Sequence Diagrams</title>
-  <author email="dev@commons.apache.org">Commons Documentation Team</author>
- </properties>
+  <properties>
+    <title>Sequence Diagrams</title>
+    <author email="dev@commons.apache.org">Commons Documentation Team</author>
+  </properties>
 
- <body>
+  <body>
 
-<section name="createDataSource">
-<img src="../images/uml/createDataSource.gif"/>
-</section>
+    <section name="createDataSource">
+      <img src="../images/uml/createDataSource.gif" />
+    </section>
 
-<section name="getConnection">
-<img src="../images/uml/getConnection.gif"/>
-</section>
+    <section name="getConnection">
+      <img src="../images/uml/getConnection.gif" />
+    </section>
 
-<section name="prepareStatement">
-<img src="../images/uml/prepareStatement.gif"/>
-</section>
+    <section name="prepareStatement">
+      <img src="../images/uml/prepareStatement.gif" />
+    </section>
 
-</body>
+  </body>
 </document>


[02/50] [abbrv] commons-dbcp git commit: Refactor common code.

Posted by gg...@apache.org.
Refactor common code.

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

Branch: refs/heads/release
Commit: 8672c3560a180a36f854458724ab7b40ee8b9d54
Parents: c432a07
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:08:43 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:08:43 2018 -0600

----------------------------------------------------------------------
 .../dbcp2/DelegatingCallableStatement.java      | 230 ++++++++++---------
 1 file changed, 117 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/8672c356/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
index ac48ce8..9a1474c 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
@@ -66,7 +66,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void registerOutParameter(final int parameterIndex, final int sqlType) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).registerOutParameter(parameterIndex, sqlType);
+            getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -76,7 +76,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void registerOutParameter(final int parameterIndex, final int sqlType, final int scale) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).registerOutParameter(parameterIndex, sqlType, scale);
+            getDelegateCallableStatement().registerOutParameter(parameterIndex, sqlType, scale);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -86,7 +86,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public boolean wasNull() throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).wasNull();
+            return getDelegateCallableStatement().wasNull();
         } catch (final SQLException e) {
             handleException(e);
             return false;
@@ -97,7 +97,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public String getString(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getString(parameterIndex);
+            return getDelegateCallableStatement().getString(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -108,7 +108,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public boolean getBoolean(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBoolean(parameterIndex);
+            return getDelegateCallableStatement().getBoolean(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return false;
@@ -119,7 +119,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public byte getByte(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getByte(parameterIndex);
+            return getDelegateCallableStatement().getByte(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -130,7 +130,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public short getShort(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getShort(parameterIndex);
+            return getDelegateCallableStatement().getShort(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -141,7 +141,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public int getInt(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getInt(parameterIndex);
+            return getDelegateCallableStatement().getInt(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -152,7 +152,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public long getLong(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getLong(parameterIndex);
+            return getDelegateCallableStatement().getLong(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -163,7 +163,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public float getFloat(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getFloat(parameterIndex);
+            return getDelegateCallableStatement().getFloat(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -174,7 +174,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public double getDouble(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getDouble(parameterIndex);
+            return getDelegateCallableStatement().getDouble(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -187,7 +187,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public BigDecimal getBigDecimal(final int parameterIndex, final int scale) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBigDecimal(parameterIndex, scale);
+            return getDelegateCallableStatement().getBigDecimal(parameterIndex, scale);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -198,7 +198,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public byte[] getBytes(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBytes(parameterIndex);
+            return getDelegateCallableStatement().getBytes(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -209,7 +209,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Date getDate(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getDate(parameterIndex);
+            return getDelegateCallableStatement().getDate(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -220,7 +220,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Time getTime(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTime(parameterIndex);
+            return getDelegateCallableStatement().getTime(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -231,7 +231,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Timestamp getTimestamp(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTimestamp(parameterIndex);
+            return getDelegateCallableStatement().getTimestamp(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -242,7 +242,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Object getObject(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getObject(parameterIndex);
+            return getDelegateCallableStatement().getObject(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -253,7 +253,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public BigDecimal getBigDecimal(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBigDecimal(parameterIndex);
+            return getDelegateCallableStatement().getBigDecimal(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -264,7 +264,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Object getObject(final int i, final Map<String, Class<?>> map) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getObject(i, map);
+            return getDelegateCallableStatement().getObject(i, map);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -275,7 +275,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Ref getRef(final int i) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getRef(i);
+            return getDelegateCallableStatement().getRef(i);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -286,7 +286,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Blob getBlob(final int i) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBlob(i);
+            return getDelegateCallableStatement().getBlob(i);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -297,7 +297,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Clob getClob(final int i) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getClob(i);
+            return getDelegateCallableStatement().getClob(i);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -308,7 +308,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Array getArray(final int i) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getArray(i);
+            return getDelegateCallableStatement().getArray(i);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -319,7 +319,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Date getDate(final int parameterIndex, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getDate(parameterIndex, cal);
+            return getDelegateCallableStatement().getDate(parameterIndex, cal);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -330,7 +330,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Time getTime(final int parameterIndex, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTime(parameterIndex, cal);
+            return getDelegateCallableStatement().getTime(parameterIndex, cal);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -341,7 +341,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Timestamp getTimestamp(final int parameterIndex, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTimestamp(parameterIndex, cal);
+            return getDelegateCallableStatement().getTimestamp(parameterIndex, cal);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -353,7 +353,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).registerOutParameter(paramIndex, sqlType, typeName);
+            getDelegateCallableStatement().registerOutParameter(paramIndex, sqlType, typeName);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -363,7 +363,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void registerOutParameter(final String parameterName, final int sqlType) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).registerOutParameter(parameterName, sqlType);
+            getDelegateCallableStatement().registerOutParameter(parameterName, sqlType);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -374,7 +374,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).registerOutParameter(parameterName, sqlType, scale);
+            getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, scale);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -385,7 +385,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).registerOutParameter(parameterName, sqlType, typeName);
+            getDelegateCallableStatement().registerOutParameter(parameterName, sqlType, typeName);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -395,7 +395,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public URL getURL(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getURL(parameterIndex);
+            return getDelegateCallableStatement().getURL(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -406,7 +406,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setURL(final String parameterName, final URL val) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setURL(parameterName, val);
+            getDelegateCallableStatement().setURL(parameterName, val);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -416,7 +416,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setNull(final String parameterName, final int sqlType) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNull(parameterName, sqlType);
+            getDelegateCallableStatement().setNull(parameterName, sqlType);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -426,7 +426,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setBoolean(final String parameterName, final boolean x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBoolean(parameterName, x);
+            getDelegateCallableStatement().setBoolean(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -436,7 +436,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setByte(final String parameterName, final byte x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setByte(parameterName, x);
+            getDelegateCallableStatement().setByte(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -446,7 +446,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setShort(final String parameterName, final short x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setShort(parameterName, x);
+            getDelegateCallableStatement().setShort(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -456,7 +456,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setInt(final String parameterName, final int x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setInt(parameterName, x);
+            getDelegateCallableStatement().setInt(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -466,7 +466,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setLong(final String parameterName, final long x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setLong(parameterName, x);
+            getDelegateCallableStatement().setLong(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -476,7 +476,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setFloat(final String parameterName, final float x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setFloat(parameterName, x);
+            getDelegateCallableStatement().setFloat(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -486,7 +486,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setDouble(final String parameterName, final double x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setDouble(parameterName, x);
+            getDelegateCallableStatement().setDouble(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -496,7 +496,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setBigDecimal(final String parameterName, final BigDecimal x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBigDecimal(parameterName, x);
+            getDelegateCallableStatement().setBigDecimal(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -506,7 +506,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setString(final String parameterName, final String x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setString(parameterName, x);
+            getDelegateCallableStatement().setString(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -516,7 +516,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setBytes(final String parameterName, final byte[] x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBytes(parameterName, x);
+            getDelegateCallableStatement().setBytes(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -526,7 +526,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setDate(final String parameterName, final Date x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setDate(parameterName, x);
+            getDelegateCallableStatement().setDate(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -536,7 +536,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setTime(final String parameterName, final Time x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setTime(parameterName, x);
+            getDelegateCallableStatement().setTime(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -546,7 +546,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setTimestamp(final String parameterName, final Timestamp x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setTimestamp(parameterName, x);
+            getDelegateCallableStatement().setTimestamp(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -556,7 +556,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setAsciiStream(final String parameterName, final InputStream x, final int length) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setAsciiStream(parameterName, x, length);
+            getDelegateCallableStatement().setAsciiStream(parameterName, x, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -566,7 +566,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setBinaryStream(final String parameterName, final InputStream x, final int length) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBinaryStream(parameterName, x, length);
+            getDelegateCallableStatement().setBinaryStream(parameterName, x, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -577,7 +577,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setObject(parameterName, x, targetSqlType, scale);
+            getDelegateCallableStatement().setObject(parameterName, x, targetSqlType, scale);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -587,7 +587,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setObject(final String parameterName, final Object x, final int targetSqlType) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setObject(parameterName, x, targetSqlType);
+            getDelegateCallableStatement().setObject(parameterName, x, targetSqlType);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -597,7 +597,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setObject(final String parameterName, final Object x) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setObject(parameterName, x);
+            getDelegateCallableStatement().setObject(parameterName, x);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -607,14 +607,14 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setCharacterStream(final String parameterName, final Reader reader, final int length)
             throws SQLException {
         checkOpen();
-        ((CallableStatement) getDelegate()).setCharacterStream(parameterName, reader, length);
+        getDelegateCallableStatement().setCharacterStream(parameterName, reader, length);
     }
 
     @Override
     public void setDate(final String parameterName, final Date x, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setDate(parameterName, x, cal);
+            getDelegateCallableStatement().setDate(parameterName, x, cal);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -624,7 +624,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setTime(final String parameterName, final Time x, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setTime(parameterName, x, cal);
+            getDelegateCallableStatement().setTime(parameterName, x, cal);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -634,7 +634,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setTimestamp(final String parameterName, final Timestamp x, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setTimestamp(parameterName, x, cal);
+            getDelegateCallableStatement().setTimestamp(parameterName, x, cal);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -644,7 +644,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setNull(final String parameterName, final int sqlType, final String typeName) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNull(parameterName, sqlType, typeName);
+            getDelegateCallableStatement().setNull(parameterName, sqlType, typeName);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -654,7 +654,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public String getString(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getString(parameterName);
+            return getDelegateCallableStatement().getString(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -665,7 +665,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public boolean getBoolean(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBoolean(parameterName);
+            return getDelegateCallableStatement().getBoolean(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return false;
@@ -676,7 +676,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public byte getByte(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getByte(parameterName);
+            return getDelegateCallableStatement().getByte(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -687,7 +687,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public short getShort(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getShort(parameterName);
+            return getDelegateCallableStatement().getShort(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -698,7 +698,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public int getInt(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getInt(parameterName);
+            return getDelegateCallableStatement().getInt(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -709,7 +709,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public long getLong(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getLong(parameterName);
+            return getDelegateCallableStatement().getLong(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -720,7 +720,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public float getFloat(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getFloat(parameterName);
+            return getDelegateCallableStatement().getFloat(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -731,7 +731,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public double getDouble(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getDouble(parameterName);
+            return getDelegateCallableStatement().getDouble(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return 0;
@@ -742,7 +742,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public byte[] getBytes(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBytes(parameterName);
+            return getDelegateCallableStatement().getBytes(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -753,7 +753,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Date getDate(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getDate(parameterName);
+            return getDelegateCallableStatement().getDate(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -764,7 +764,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Time getTime(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTime(parameterName);
+            return getDelegateCallableStatement().getTime(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -775,7 +775,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Timestamp getTimestamp(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTimestamp(parameterName);
+            return getDelegateCallableStatement().getTimestamp(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -786,7 +786,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Object getObject(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getObject(parameterName);
+            return getDelegateCallableStatement().getObject(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -797,7 +797,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public BigDecimal getBigDecimal(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBigDecimal(parameterName);
+            return getDelegateCallableStatement().getBigDecimal(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -808,7 +808,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Object getObject(final String parameterName, final Map<String, Class<?>> map) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getObject(parameterName, map);
+            return getDelegateCallableStatement().getObject(parameterName, map);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -819,7 +819,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Ref getRef(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getRef(parameterName);
+            return getDelegateCallableStatement().getRef(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -830,7 +830,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Blob getBlob(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getBlob(parameterName);
+            return getDelegateCallableStatement().getBlob(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -841,7 +841,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Clob getClob(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getClob(parameterName);
+            return getDelegateCallableStatement().getClob(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -852,7 +852,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Array getArray(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getArray(parameterName);
+            return getDelegateCallableStatement().getArray(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -863,18 +863,22 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Date getDate(final String parameterName, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getDate(parameterName, cal);
+            return getDelegateCallableStatement().getDate(parameterName, cal);
         } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
+    private CallableStatement getDelegateCallableStatement() {
+        return (CallableStatement) getDelegate();
+    }
+
     @Override
     public Time getTime(final String parameterName, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTime(parameterName, cal);
+            return getDelegateCallableStatement().getTime(parameterName, cal);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -885,7 +889,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Timestamp getTimestamp(final String parameterName, final Calendar cal) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getTimestamp(parameterName, cal);
+            return getDelegateCallableStatement().getTimestamp(parameterName, cal);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -896,7 +900,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public URL getURL(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getURL(parameterName);
+            return getDelegateCallableStatement().getURL(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -907,7 +911,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public RowId getRowId(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getRowId(parameterIndex);
+            return getDelegateCallableStatement().getRowId(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -918,7 +922,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public RowId getRowId(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getRowId(parameterName);
+            return getDelegateCallableStatement().getRowId(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -929,7 +933,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setRowId(final String parameterName, final RowId value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setRowId(parameterName, value);
+            getDelegateCallableStatement().setRowId(parameterName, value);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -939,7 +943,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setNString(final String parameterName, final String value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNString(parameterName, value);
+            getDelegateCallableStatement().setNString(parameterName, value);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -950,7 +954,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNCharacterStream(parameterName, reader, length);
+            getDelegateCallableStatement().setNCharacterStream(parameterName, reader, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -960,7 +964,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setNClob(final String parameterName, final NClob value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNClob(parameterName, value);
+            getDelegateCallableStatement().setNClob(parameterName, value);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -970,7 +974,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setClob(final String parameterName, final Reader reader, final long length) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setClob(parameterName, reader, length);
+            getDelegateCallableStatement().setClob(parameterName, reader, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -981,7 +985,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBlob(parameterName, inputStream, length);
+            getDelegateCallableStatement().setBlob(parameterName, inputStream, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -991,7 +995,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setNClob(final String parameterName, final Reader reader, final long length) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNClob(parameterName, reader, length);
+            getDelegateCallableStatement().setNClob(parameterName, reader, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1001,7 +1005,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public NClob getNClob(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getNClob(parameterIndex);
+            return getDelegateCallableStatement().getNClob(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1012,7 +1016,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public NClob getNClob(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getNClob(parameterName);
+            return getDelegateCallableStatement().getNClob(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1023,7 +1027,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setSQLXML(final String parameterName, final SQLXML value) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setSQLXML(parameterName, value);
+            getDelegateCallableStatement().setSQLXML(parameterName, value);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1033,7 +1037,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public SQLXML getSQLXML(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getSQLXML(parameterIndex);
+            return getDelegateCallableStatement().getSQLXML(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1044,7 +1048,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public SQLXML getSQLXML(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getSQLXML(parameterName);
+            return getDelegateCallableStatement().getSQLXML(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1055,7 +1059,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public String getNString(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getNString(parameterIndex);
+            return getDelegateCallableStatement().getNString(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1066,7 +1070,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public String getNString(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getNString(parameterName);
+            return getDelegateCallableStatement().getNString(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1077,7 +1081,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Reader getNCharacterStream(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getNCharacterStream(parameterIndex);
+            return getDelegateCallableStatement().getNCharacterStream(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1088,7 +1092,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Reader getNCharacterStream(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getNCharacterStream(parameterName);
+            return getDelegateCallableStatement().getNCharacterStream(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1099,7 +1103,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Reader getCharacterStream(final int parameterIndex) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getCharacterStream(parameterIndex);
+            return getDelegateCallableStatement().getCharacterStream(parameterIndex);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1110,7 +1114,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public Reader getCharacterStream(final String parameterName) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getCharacterStream(parameterName);
+            return getDelegateCallableStatement().getCharacterStream(parameterName);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1121,7 +1125,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setBlob(final String parameterName, final Blob blob) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBlob(parameterName, blob);
+            getDelegateCallableStatement().setBlob(parameterName, blob);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1131,7 +1135,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setClob(final String parameterName, final Clob clob) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setClob(parameterName, clob);
+            getDelegateCallableStatement().setClob(parameterName, clob);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1142,7 +1146,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setAsciiStream(parameterName, inputStream, length);
+            getDelegateCallableStatement().setAsciiStream(parameterName, inputStream, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1153,7 +1157,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBinaryStream(parameterName, inputStream, length);
+            getDelegateCallableStatement().setBinaryStream(parameterName, inputStream, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1164,7 +1168,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
             throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setCharacterStream(parameterName, reader, length);
+            getDelegateCallableStatement().setCharacterStream(parameterName, reader, length);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1174,7 +1178,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setAsciiStream(final String parameterName, final InputStream inputStream) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setAsciiStream(parameterName, inputStream);
+            getDelegateCallableStatement().setAsciiStream(parameterName, inputStream);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1184,7 +1188,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setBinaryStream(final String parameterName, final InputStream inputStream) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBinaryStream(parameterName, inputStream);
+            getDelegateCallableStatement().setBinaryStream(parameterName, inputStream);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1194,7 +1198,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setCharacterStream(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setCharacterStream(parameterName, reader);
+            getDelegateCallableStatement().setCharacterStream(parameterName, reader);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1204,7 +1208,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setNCharacterStream(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNCharacterStream(parameterName, reader);
+            getDelegateCallableStatement().setNCharacterStream(parameterName, reader);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1214,7 +1218,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setClob(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setClob(parameterName, reader);
+            getDelegateCallableStatement().setClob(parameterName, reader);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1224,7 +1228,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setBlob(final String parameterName, final InputStream inputStream) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setBlob(parameterName, inputStream);
+            getDelegateCallableStatement().setBlob(parameterName, inputStream);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1234,7 +1238,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public void setNClob(final String parameterName, final Reader reader) throws SQLException {
         checkOpen();
         try {
-            ((CallableStatement) getDelegate()).setNClob(parameterName, reader);
+            getDelegateCallableStatement().setNClob(parameterName, reader);
         } catch (final SQLException e) {
             handleException(e);
         }
@@ -1244,7 +1248,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public <T> T getObject(final int parameterIndex, final Class<T> type) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getObject(parameterIndex, type);
+            return getDelegateCallableStatement().getObject(parameterIndex, type);
         } catch (final SQLException e) {
             handleException(e);
             return null;
@@ -1255,7 +1259,7 @@ public class DelegatingCallableStatement extends DelegatingPreparedStatement imp
     public <T> T getObject(final String parameterName, final Class<T> type) throws SQLException {
         checkOpen();
         try {
-            return ((CallableStatement) getDelegate()).getObject(parameterName, type);
+            return getDelegateCallableStatement().getObject(parameterName, type);
         } catch (final SQLException e) {
             handleException(e);
             return null;


[35/50] [abbrv] commons-dbcp git commit: Add missing Javadoc and Javadoc tweaks.

Posted by gg...@apache.org.
Add missing Javadoc and Javadoc tweaks.

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

Branch: refs/heads/release
Commit: 9b7cc8b38d7d2ce97ace6e7a9c904f910b7bc096
Parents: 55cc86a
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:50:34 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:50:34 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/commons/dbcp2/PoolingDataSource.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/9b7cc8b3/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
index f4d6cbe..d28f7a4 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
@@ -46,6 +46,12 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
     /** Controls access to the underlying connection */
     private boolean accessToUnderlyingConnectionAllowed;
 
+    /**
+     * Constructs a new instance backed by the given connection pool.
+     * 
+     * @param pool
+     *            the given connection pool.
+     */
     public PoolingDataSource(final ObjectPool<C> pool) {
         Objects.requireNonNull(pool, "Pool must not be null.");
         this.pool = pool;
@@ -63,7 +69,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
     }
 
     /**
-     * Close and free all {@link Connection}s from the pool.
+     * Closes and free all {@link Connection}s from the pool.
      *
      * @since 2.1
      */
@@ -118,7 +124,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
     //--- DataSource methods -----------------------------------------
 
     /**
-     * Return a {@link java.sql.Connection} from my pool, according to the contract specified by
+     * Returns a {@link java.sql.Connection} from my pool, according to the contract specified by
      * {@link ObjectPool#borrowObject}.
      */
     @Override


[43/50] [abbrv] commons-dbcp git commit: Specify the scale in the name of variable for the query timeout.

Posted by gg...@apache.org.
Specify the scale in the name of variable for the query timeout.

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

Branch: refs/heads/release
Commit: f283f4c4b6183504135a98a3e0d77eb89f391bcf
Parents: 7908328
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Jun 12 08:25:29 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Jun 12 08:25:29 2018 -0600

----------------------------------------------------------------------
 .../commons/dbcp2/DelegatingConnection.java     |  4 ++--
 .../commons/dbcp2/PoolableConnection.java       | 20 ++++++++++----------
 .../datasources/CPDSConnectionFactory.java      |  8 ++++----
 3 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/f283f4c4/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index e4280b2..d6db252 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -854,12 +854,12 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i
     }
 
     @Override
-    public boolean isValid(final int timeout) throws SQLException {
+    public boolean isValid(final int timeoutSeconds) throws SQLException {
         if (isClosed()) {
             return false;
         }
         try {
-            return connection.isValid(timeout);
+            return connection.isValid(timeoutSeconds);
         } catch (final SQLException e) {
             handleException(e);
             return false;

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/f283f4c4/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
index 6658cae..a369f05 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnection.java
@@ -252,22 +252,22 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
      * </ol>
      *
      * @param sql
-     *            validation query
-     * @param timeout
-     *            validation timeout
+     *            The validation SQL query.
+     * @param timeoutSeconds
+     *            The validation timeout in seconds.
      * @throws SQLException
-     *             if validation fails or an SQLException occurs during validation
+     *             Thrown when validation fails or an SQLException occurs during validation
      */
-    public void validate(final String sql, int timeout) throws SQLException {
+    public void validate(final String sql, int timeoutSeconds) throws SQLException {
         if (fastFailValidation && fatalSqlExceptionThrown) {
             throw new SQLException(Utils.getMessage("poolableConnection.validate.fastFail"));
         }
 
         if (sql == null || sql.length() == 0) {
-            if (timeout < 0) {
-                timeout = 0;
+            if (timeoutSeconds < 0) {
+                timeoutSeconds = 0;
             }
-            if (!isValid(timeout)) {
+            if (!isValid(timeoutSeconds)) {
                 throw new SQLException("isValid() returned false");
             }
             return;
@@ -280,8 +280,8 @@ public class PoolableConnection extends DelegatingConnection<Connection> impleme
             validationPreparedStatement = getInnermostDelegateInternal().prepareStatement(sql);
         }
 
-        if (timeout > 0) {
-            validationPreparedStatement.setQueryTimeout(timeout);
+        if (timeoutSeconds > 0) {
+            validationPreparedStatement.setQueryTimeout(timeoutSeconds);
         }
 
         try (ResultSet rs = validationPreparedStatement.executeQuery()) {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/f283f4c4/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
index d6aa18a..f0ae74d 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
@@ -192,13 +192,13 @@ class CPDSConnectionFactory
         Connection conn = null;
         validatingSet.add(pconn);
         if (null == validationQuery) {
-            int timeout = validationQueryTimeoutSeconds;
-            if (timeout < 0) {
-                timeout = 0;
+            int timeoutSeconds = validationQueryTimeoutSeconds;
+            if (timeoutSeconds < 0) {
+                timeoutSeconds = 0;
             }
             try {
                 conn = pconn.getConnection();
-                valid = conn.isValid(timeout);
+                valid = conn.isValid(timeoutSeconds);
             } catch (final SQLException e) {
                 valid = false;
             } finally {


[42/50] [abbrv] commons-dbcp git commit: Don't use deprecated API and better param name.

Posted by gg...@apache.org.
Don't use deprecated API and better param name.

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

Branch: refs/heads/release
Commit: 7908328f012778568c6da95f7081b8c4b9754009
Parents: 0047005
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Jun 12 08:23:05 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Jun 12 08:23:05 2018 -0600

----------------------------------------------------------------------
 .../datasources/KeyedCPDSConnectionFactory.java   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/7908328f/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
index a755ebf..f802b8a 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/KeyedCPDSConnectionFactory.java
@@ -131,7 +131,7 @@ class KeyedCPDSConnectionFactory implements KeyedPooledObjectFactory<UserPassKey
         // should we add this object as a listener or the pool.
         // consider the validateObject method in decision
         pc.addConnectionEventListener(this);
-        pci = new PooledConnectionAndInfo(pc, userName, password);
+        pci = new PooledConnectionAndInfo(pc, userName, upkey.getPasswordCharArray());
         pcMap.put(pc, pci);
 
         return new DefaultPooledObject<>(pci);
@@ -153,29 +153,29 @@ class KeyedCPDSConnectionFactory implements KeyedPooledObjectFactory<UserPassKey
      *
      * @param key
      *            ignored
-     * @param p
+     * @param pooledObject
      *            wrapped {@link PooledConnectionAndInfo} containing the connection to validate
      * @return true if validation succeeds
      */
     @Override
-    public boolean validateObject(final UserPassKey key, final PooledObject<PooledConnectionAndInfo> p) {
+    public boolean validateObject(final UserPassKey key, final PooledObject<PooledConnectionAndInfo> pooledObject) {
         try {
-            validateLifetime(p);
+            validateLifetime(pooledObject);
         } catch (final Exception e) {
             return false;
         }
         boolean valid = false;
-        final PooledConnection pconn = p.getObject().getPooledConnection();
+        final PooledConnection pconn = pooledObject.getObject().getPooledConnection();
         Connection conn = null;
         validatingSet.add(pconn);
         if (null == validationQuery) {
-            int timeout = validationQueryTimeoutSeconds;
-            if (timeout < 0) {
-                timeout = 0;
+            int timeoutSeconds = validationQueryTimeoutSeconds;
+            if (timeoutSeconds < 0) {
+                timeoutSeconds = 0;
             }
             try {
                 conn = pconn.getConnection();
-                valid = conn.isValid(timeout);
+                valid = conn.isValid(timeoutSeconds);
             } catch (final SQLException e) {
                 valid = false;
             } finally {


[36/50] [abbrv] commons-dbcp git commit: Javadoc.

Posted by gg...@apache.org.
Javadoc.

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

Branch: refs/heads/release
Commit: c43bd771ac9af8cd23f7c6e4672e6d44523071b0
Parents: 9b7cc8b
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:54:43 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:54:43 2018 -0600

----------------------------------------------------------------------
 .../commons/dbcp2/PoolableConnectionFactory.java       | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/c43bd771/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
index 476b84e..a948d78 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
@@ -166,11 +166,24 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
         this.poolStatements = poolStatements;
     }
 
+    /**
+     * Deprecated due to typo in method name.
+     * 
+     * @param maxOpenPreparedStatements
+     *            The maximum number of open prepared statements.
+     * @deprecated Use {@link #setMaxOpenPreparedStatements(int)}.
+     */
     @Deprecated // Due to typo in method name.
     public void setMaxOpenPrepatedStatements(final int maxOpenPreparedStatements) {
         setMaxOpenPreparedStatements(maxOpenPreparedStatements);
     }
 
+    /**
+     * Sets the maximum number of open prepared statements.
+     * 
+     * @param maxOpenPreparedStatements
+     *            The maximum number of open prepared statements.
+     */
     public void setMaxOpenPreparedStatements(final int maxOpenPreparedStatements) {
         this.maxOpenPreparedStatements = maxOpenPreparedStatements;
     }


[08/50] [abbrv] commons-dbcp git commit: Better lvar name and line length 120.

Posted by gg...@apache.org.
Better lvar name and line length 120.

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

Branch: refs/heads/release
Commit: 6a612f3c67cc92929c236c69e70b0131726c6808
Parents: 8e1b54f
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:40:32 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:40:32 2018 -0600

----------------------------------------------------------------------
 .../dbcp2/cpdsadapter/DriverAdapterCPDS.java    | 22 +++++++++++---------
 1 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/6a612f3c/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
index ebda000..49a20d6 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
@@ -157,27 +157,29 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl
     public PooledConnection getPooledConnection(final String pooledUserName, final String pooledUserPassword)
             throws SQLException {
         getConnectionCalled = true;
-        PooledConnectionImpl pci = null;
+        PooledConnectionImpl pooledConnection = null;
         // Workaround for buggy WebLogic 5.1 classloader - ignore the
         // exception upon first invocation.
         try {
             if (connectionProperties != null) {
                 update(connectionProperties, KEY_USER, pooledUserName);
                 update(connectionProperties, KEY_PASSWORD, pooledUserPassword);
-                pci = new PooledConnectionImpl(DriverManager.getConnection(getUrl(), connectionProperties));
+                pooledConnection = new PooledConnectionImpl(
+                        DriverManager.getConnection(getUrl(), connectionProperties));
             } else {
-                pci = new PooledConnectionImpl(
+                pooledConnection = new PooledConnectionImpl(
                         DriverManager.getConnection(getUrl(), pooledUserName, pooledUserPassword));
             }
-            pci.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());
+            pooledConnection.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());
         } catch (final ClassCircularityError e) {
             if (connectionProperties != null) {
-                pci = new PooledConnectionImpl(DriverManager.getConnection(getUrl(), connectionProperties));
+                pooledConnection = new PooledConnectionImpl(
+                        DriverManager.getConnection(getUrl(), connectionProperties));
             } else {
-                pci = new PooledConnectionImpl(
+                pooledConnection = new PooledConnectionImpl(
                         DriverManager.getConnection(getUrl(), pooledUserName, pooledUserPassword));
             }
-            pci.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());
+            pooledConnection.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());
         }
         KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> stmtPool = null;
         if (isPoolPreparedStatements()) {
@@ -201,10 +203,10 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl
                 config.setNumTestsPerEvictionRun(0);
                 config.setMinEvictableIdleTimeMillis(0);
             }
-            stmtPool = new GenericKeyedObjectPool<>(pci, config);
-            pci.setStatementPool(stmtPool);
+            stmtPool = new GenericKeyedObjectPool<>(pooledConnection, config);
+            pooledConnection.setStatementPool(stmtPool);
         }
-        return pci;
+        return pooledConnection;
     }
 
     @Override


[14/50] [abbrv] commons-dbcp git commit: Javadoc.

Posted by gg...@apache.org.
Javadoc.

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

Branch: refs/heads/release
Commit: 5cc5624a22fd441ac2ec9a31e8d955993c1ef72d
Parents: 437d4d6
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:48:29 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:48:29 2018 -0600

----------------------------------------------------------------------
 .../commons/dbcp2/managed/TransactionRegistry.java | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/5cc5624a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
index 7715497..70aa23c 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
@@ -48,7 +48,7 @@ public class TransactionRegistry {
      * Creates a TransactionRegistry for the specified transaction manager.
      * 
      * @param transactionManager
-     *            the transaction manager used to enlist connections
+     *            the transaction manager used to enlist connections.
      */
     public TransactionRegistry(final TransactionManager transactionManager) {
         this.transactionManager = transactionManager;
@@ -59,9 +59,9 @@ public class TransactionRegistry {
      * it is actually the XAResource that is given to the transaction manager.
      *
      * @param connection
-     *            the JDBC connection
+     *            The JDBC connection.
      * @param xaResource
-     *            the XAResource which managed the connection within a transaction
+     *            The XAResource which managed the connection within a transaction.
      */
     public synchronized void registerConnection(final Connection connection, final XAResource xaResource) {
         Objects.requireNonNull(connection, "connection is null");
@@ -74,9 +74,9 @@ public class TransactionRegistry {
      * 
      * @param connection
      *            the connection
-     * @return the XAResource registered for the connection; never null
+     * @return The XAResource registered for the connection; never null.
      * @throws SQLException
-     *             if the connection does not have a registered XAResource
+     *             Thrown when the connection does not have a registered XAResource.
      */
     public synchronized XAResource getXAResource(final Connection connection) throws SQLException {
         Objects.requireNonNull(connection, "connection is null");
@@ -91,9 +91,9 @@ public class TransactionRegistry {
     /**
      * Gets the active TransactionContext or null if not Transaction is active.
      * 
-     * @return the active TransactionContext or null if no Transaction is active
+     * @return The active TransactionContext or null if no Transaction is active.
      * @throws SQLException
-     *             if an error occurs while fetching the transaction
+     *             Thrown when an error occurs while fetching the transaction.
      */
     public TransactionContext getActiveTransactionContext() throws SQLException {
         Transaction transaction = null;
@@ -123,9 +123,10 @@ public class TransactionRegistry {
     }
 
     /**
-     * Unregisters a destroyed connection from {@link TransactionRegistry}
+     * Unregisters a destroyed connection from {@link TransactionRegistry}.
      * 
      * @param connection
+     *            A destroyed connection from {@link TransactionRegistry}.
      */
     public synchronized void unregisterConnection(final Connection connection) {
         final Connection key = getConnectionKey(connection);


[11/50] [abbrv] commons-dbcp git commit: Line length 120 and standard formatting.

Posted by gg...@apache.org.
Line length 120 and standard formatting.

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

Branch: refs/heads/release
Commit: 0a928ca2b7a16fd49b49223bba4cd778207d0fcb
Parents: cb48137
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:44:46 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:44:46 2018 -0600

----------------------------------------------------------------------
 .../dbcp2/managed/BasicManagedDataSource.java   |  82 ++++++++------
 .../managed/DataSourceXAConnectionFactory.java  |  47 +++++---
 .../dbcp2/managed/LocalXAConnectionFactory.java | 109 +++++++++++--------
 .../dbcp2/managed/ManagedConnection.java        |  15 +--
 .../dbcp2/managed/ManagedDataSource.java        |  40 +++----
 .../managed/PoolableManagedConnection.java      |  38 ++++---
 .../PoolableManagedConnectionFactory.java       |   1 +
 .../dbcp2/managed/TransactionContext.java       |  51 +++++----
 .../managed/TransactionContextListener.java     |   7 +-
 .../dbcp2/managed/TransactionRegistry.java      |  34 +++---
 .../dbcp2/managed/XAConnectionFactory.java      |  22 ++--
 11 files changed, 252 insertions(+), 194 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java b/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
index 12fe740..c685134 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
@@ -30,22 +30,18 @@ import javax.transaction.TransactionManager;
 import java.sql.SQLException;
 
 /**
- * <p>BasicManagedDataSource is an extension of BasicDataSource which
- * creates ManagedConnections.  This data source can create either
- * full two-phase-commit XA connections or one-phase-commit
- * local connections.  Both types of connections are committed or
- * rolled back as part of the global transaction (a.k.a. XA
- * transaction or JTA Transaction), but only XA connections can be
- * recovered in the case of a system crash.
+ * <p>
+ * BasicManagedDataSource is an extension of BasicDataSource which creates ManagedConnections. This data source can
+ * create either full two-phase-commit XA connections or one-phase-commit local connections. Both types of connections
+ * are committed or rolled back as part of the global transaction (a.k.a. XA transaction or JTA Transaction), but only
+ * XA connections can be recovered in the case of a system crash.
  * </p>
- * <p>BasicManagedDataSource adds the TransactionManager and XADataSource
- * properties.  The TransactionManager property is required and is
- * used to enlist connections in global transactions.  The XADataSource
- * is optional and if set is the class name of the XADataSource class
- * for a two-phase-commit JDBC driver.  If the XADataSource property
- * is set, the driverClassName is ignored and a DataSourceXAConnectionFactory
- * is created. Otherwise, a standard DriverConnectionFactory is created
- * and wrapped with a LocalXAConnectionFactory.
+ * <p>
+ * BasicManagedDataSource adds the TransactionManager and XADataSource properties. The TransactionManager property is
+ * required and is used to enlist connections in global transactions. The XADataSource is optional and if set is the
+ * class name of the XADataSource class for a two-phase-commit JDBC driver. If the XADataSource property is set, the
+ * driverClassName is ignored and a DataSourceXAConnectionFactory is created. Otherwise, a standard
+ * DriverConnectionFactory is created and wrapped with a LocalXAConnectionFactory.
  * </p>
  *
  * @see BasicDataSource
@@ -76,14 +72,17 @@ public class BasicManagedDataSource extends BasicDataSource {
     }
 
     /**
-     * <p>Sets the XADataSource instance used by the XAConnectionFactory.</p>
      * <p>
-     * Note: this method currently has no effect once the pool has been
-     * initialized.  The pool is initialized the first time one of the
-     * following methods is invoked: <code>getConnection, setLogwriter,
-     * setLoginTimeout, getLoginTimeout, getLogWriter.</code></p>
+     * Sets the XADataSource instance used by the XAConnectionFactory.
+     * </p>
+     * <p>
+     * Note: this method currently has no effect once the pool has been initialized. The pool is initialized the first
+     * time one of the following methods is invoked: <code>getConnection, setLogwriter,
+     * setLoginTimeout, getLoginTimeout, getLogWriter.</code>
+     * </p>
      *
-     * @param xaDataSourceInstance XADataSource instance
+     * @param xaDataSourceInstance
+     *            XADataSource instance
      */
     public synchronized void setXaDataSourceInstance(final XADataSource xaDataSourceInstance) {
         this.xaDataSourceInstance = xaDataSourceInstance;
@@ -92,6 +91,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Gets the required transaction manager property.
+     * 
      * @return the transaction manager used to enlist connections
      */
     public TransactionManager getTransactionManager() {
@@ -100,6 +100,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Gets the transaction registry.
+     * 
      * @return the transaction registry associating XAResources with managed connections
      */
     protected synchronized TransactionRegistry getTransactionRegistry() {
@@ -108,7 +109,9 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Sets the required transaction manager property.
-     * @param transactionManager the transaction manager used to enlist connections
+     * 
+     * @param transactionManager
+     *            the transaction manager used to enlist connections
      */
     public void setTransactionManager(final TransactionManager transactionManager) {
         this.transactionManager = transactionManager;
@@ -116,6 +119,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Gets the optional XADataSource class name.
+     * 
      * @return the optional XADataSource class name
      */
     public synchronized String getXADataSource() {
@@ -124,7 +128,9 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Sets the optional XADataSource class name.
-     * @param xaDataSource the optional XADataSource class name
+     * 
+     * @param xaDataSource
+     *            the optional XADataSource class name
      */
     public synchronized void setXADataSource(final String xaDataSource) {
         this.xaDataSource = xaDataSource;
@@ -136,10 +142,12 @@ public class BasicManagedDataSource extends BasicDataSource {
             throw new SQLException("Transaction manager must be set before a connection can be created");
         }
 
-        // If xa data source is not specified a DriverConnectionFactory is created and wrapped with a LocalXAConnectionFactory
+        // If xa data source is not specified a DriverConnectionFactory is created and wrapped with a
+        // LocalXAConnectionFactory
         if (xaDataSource == null) {
             final ConnectionFactory connectionFactory = super.createConnectionFactory();
-            final XAConnectionFactory xaConnectionFactory = new LocalXAConnectionFactory(getTransactionManager(), connectionFactory);
+            final XAConnectionFactory xaConnectionFactory = new LocalXAConnectionFactory(getTransactionManager(),
+                    connectionFactory);
             transactionRegistry = xaConnectionFactory.getTransactionRegistry();
             return xaConnectionFactory;
         }
@@ -163,15 +171,16 @@ public class BasicManagedDataSource extends BasicDataSource {
         }
 
         // finally, create the XAConnectionFactory using the XA data source
-        final XAConnectionFactory xaConnectionFactory = new DataSourceXAConnectionFactory(getTransactionManager(), xaDataSourceInstance, getUsername(), getPassword());
+        final XAConnectionFactory xaConnectionFactory = new DataSourceXAConnectionFactory(getTransactionManager(),
+                xaDataSourceInstance, getUsername(), getPassword());
         transactionRegistry = xaConnectionFactory.getTransactionRegistry();
         return xaConnectionFactory;
     }
 
     @Override
     protected DataSource createDataSourceInstance() throws SQLException {
-        final PoolingDataSource<PoolableConnection> pds =
-                new ManagedDataSource<>(getConnectionPool(), transactionRegistry);
+        final PoolingDataSource<PoolableConnection> pds = new ManagedDataSource<>(getConnectionPool(),
+                transactionRegistry);
         pds.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());
         return pds;
     }
@@ -179,16 +188,18 @@ public class BasicManagedDataSource extends BasicDataSource {
     /**
      * Creates the PoolableConnectionFactory and attaches it to the connection pool.
      *
-     * @param driverConnectionFactory JDBC connection factory created by {@link #createConnectionFactory()}
-     * @throws SQLException if an error occurs creating the PoolableConnectionFactory
+     * @param driverConnectionFactory
+     *            JDBC connection factory created by {@link #createConnectionFactory()}
+     * @throws SQLException
+     *             if an error occurs creating the PoolableConnectionFactory
      */
     @Override
-    protected PoolableConnectionFactory createPoolableConnectionFactory(
-            final ConnectionFactory driverConnectionFactory) throws SQLException {
+    protected PoolableConnectionFactory createPoolableConnectionFactory(final ConnectionFactory driverConnectionFactory)
+            throws SQLException {
         PoolableConnectionFactory connectionFactory = null;
         try {
-            connectionFactory = new PoolableManagedConnectionFactory(
-                    (XAConnectionFactory) driverConnectionFactory, getRegisteredJmxName());
+            connectionFactory = new PoolableManagedConnectionFactory((XAConnectionFactory) driverConnectionFactory,
+                    getRegisteredJmxName());
             connectionFactory.setValidationQuery(getValidationQuery());
             connectionFactory.setValidationQueryTimeout(getValidationQueryTimeout());
             connectionFactory.setConnectionInitSql(getConnectionInitSqls());
@@ -198,8 +209,7 @@ public class BasicManagedDataSource extends BasicDataSource {
             connectionFactory.setDefaultCatalog(getDefaultCatalog());
             connectionFactory.setCacheState(getCacheState());
             connectionFactory.setPoolStatements(isPoolPreparedStatements());
-            connectionFactory.setMaxOpenPreparedStatements(
-                    getMaxOpenPreparedStatements());
+            connectionFactory.setMaxOpenPreparedStatements(getMaxOpenPreparedStatements());
             connectionFactory.setMaxConnLifetimeMillis(getMaxConnLifetimeMillis());
             connectionFactory.setRollbackOnReturn(getRollbackOnReturn());
             connectionFactory.setEnableAutoCommitOnReturn(getEnableAutoCommitOnReturn());

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
index 6eb3f03..7e974e0 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
@@ -43,24 +43,30 @@ public class DataSourceXAConnectionFactory implements XAConnectionFactory {
     private char[] userPassword;
 
     /**
-     * Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database
-     * connections.  The connections are enlisted into transactions using the specified transaction manager.
+     * Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database connections.
+     * The connections are enlisted into transactions using the specified transaction manager.
      *
-     * @param transactionManager the transaction manager in which connections will be enlisted
-     * @param xaDataSource the data source from which connections will be retrieved
+     * @param transactionManager
+     *            the transaction manager in which connections will be enlisted
+     * @param xaDataSource
+     *            the data source from which connections will be retrieved
      */
     public DataSourceXAConnectionFactory(final TransactionManager transactionManager, final XADataSource xaDataSource) {
         this(transactionManager, xaDataSource, null, (char[]) null);
     }
 
     /**
-     * Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database
-     * connections.  The connections are enlisted into transactions using the specified transaction manager.
+     * Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database connections.
+     * The connections are enlisted into transactions using the specified transaction manager.
      *
-     * @param transactionManager the transaction manager in which connections will be enlisted
-     * @param xaDataSource the data source from which connections will be retrieved
-     * @param userName the user name used for authenticating new connections or null for unauthenticated
-     * @param userPassword the password used for authenticating new connections
+     * @param transactionManager
+     *            the transaction manager in which connections will be enlisted
+     * @param xaDataSource
+     *            the data source from which connections will be retrieved
+     * @param userName
+     *            the user name used for authenticating new connections or null for unauthenticated
+     * @param userPassword
+     *            the password used for authenticating new connections
      */
     public DataSourceXAConnectionFactory(final TransactionManager transactionManager, final XADataSource xaDataSource,
             final String userName, final char[] userPassword) {
@@ -73,13 +79,17 @@ public class DataSourceXAConnectionFactory implements XAConnectionFactory {
     }
 
     /**
-     * Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database
-     * connections.  The connections are enlisted into transactions using the specified transaction manager.
+     * Creates an DataSourceXAConnectionFactory which uses the specified XADataSource to create database connections.
+     * The connections are enlisted into transactions using the specified transaction manager.
      *
-     * @param transactionManager the transaction manager in which connections will be enlisted
-     * @param xaDataSource the data source from which connections will be retrieved
-     * @param userName the user name used for authenticating new connections or null for unauthenticated
-     * @param userPassword the password used for authenticating new connections
+     * @param transactionManager
+     *            the transaction manager in which connections will be enlisted
+     * @param xaDataSource
+     *            the data source from which connections will be retrieved
+     * @param userName
+     *            the user name used for authenticating new connections or null for unauthenticated
+     * @param userPassword
+     *            the password used for authenticating new connections
      */
     public DataSourceXAConnectionFactory(final TransactionManager transactionManager, final XADataSource xaDataSource,
             final String userName, final String userPassword) {
@@ -88,6 +98,7 @@ public class DataSourceXAConnectionFactory implements XAConnectionFactory {
 
     /**
      * Gets the user name used to authenticate new connections.
+     * 
      * @return the user name or null if unauthenticated connections are used
      */
     public String getUsername() {
@@ -96,7 +107,9 @@ public class DataSourceXAConnectionFactory implements XAConnectionFactory {
 
     /**
      * Sets the user name used to authenticate new connections.
-     * @param userName the user name used for authenticating the connection or null for unauthenticated
+     * 
+     * @param userName
+     *            the user name used for authenticating the connection or null for unauthenticated
      */
     public void setUsername(final String userName) {
         this.userName = userName;

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
index af268bf..79fbd73 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
@@ -28,7 +28,7 @@ import java.sql.SQLException;
 import java.util.Objects;
 
 /**
- * An implementation of XAConnectionFactory which manages non-XA connections in XA transactions.  A non-XA connection
+ * An implementation of XAConnectionFactory which manages non-XA connections in XA transactions. A non-XA connection
  * commits and rolls back as part of the XA transaction, but is not recoverable since the connection does not implement
  * the 2-phase protocol.
  *
@@ -39,13 +39,16 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
     private final ConnectionFactory connectionFactory;
 
     /**
-     * Creates an LocalXAConnectionFactory which uses the specified connection factory to create database
-     * connections.  The connections are enlisted into transactions using the specified transaction manager.
+     * Creates an LocalXAConnectionFactory which uses the specified connection factory to create database connections.
+     * The connections are enlisted into transactions using the specified transaction manager.
      *
-     * @param transactionManager the transaction manager in which connections will be enlisted
-     * @param connectionFactory  the connection factory from which connections will be retrieved
+     * @param transactionManager
+     *            the transaction manager in which connections will be enlisted
+     * @param connectionFactory
+     *            the connection factory from which connections will be retrieved
      */
-    public LocalXAConnectionFactory(final TransactionManager transactionManager, final ConnectionFactory connectionFactory) {
+    public LocalXAConnectionFactory(final TransactionManager transactionManager,
+            final ConnectionFactory connectionFactory) {
         Objects.requireNonNull(transactionManager, "transactionManager is null");
         Objects.requireNonNull(connectionFactory, "connectionFactory is null");
         this.transactionRegistry = new TransactionRegistry(transactionManager);
@@ -72,16 +75,16 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
     }
 
     /**
-     * LocalXAResource is a fake XAResource for non-XA connections.  When a transaction is started
-     * the connection auto-commit is turned off.  When the connection is committed or rolled back,
-     * the commit or rollback method is called on the connection and then the original auto-commit
-     * value is restored.
+     * LocalXAResource is a fake XAResource for non-XA connections. When a transaction is started the connection
+     * auto-commit is turned off. When the connection is committed or rolled back, the commit or rollback method is
+     * called on the connection and then the original auto-commit value is restored.
      * <p>
-     * The LocalXAResource also respects the connection read-only setting.  If the connection is
-     * read-only the commit method will not be called, and the prepare method returns the XA_RDONLY.
+     * The LocalXAResource also respects the connection read-only setting. If the connection is read-only the commit
+     * method will not be called, and the prepare method returns the XA_RDONLY.
      * </p>
-     * It is assumed that the wrapper around a managed connection disables the setAutoCommit(),
-     * commit(), rollback() and setReadOnly() methods while a transaction is in progress.
+     * It is assumed that the wrapper around a managed connection disables the setAutoCommit(), commit(), rollback() and
+     * setReadOnly() methods while a transaction is in progress.
+     * 
      * @since 2.0
      */
     protected static class LocalXAResource implements XAResource {
@@ -103,14 +106,17 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         }
 
         /**
-         * Signals that a the connection has been enrolled in a transaction.  This method saves off the
-         * current auto commit flag, and then disables auto commit.  The original auto commit setting is
-         * restored when the transaction completes.
+         * Signals that a the connection has been enrolled in a transaction. This method saves off the current auto
+         * commit flag, and then disables auto commit. The original auto commit setting is restored when the transaction
+         * completes.
          *
-         * @param xid  the id of the transaction branch for this connection
-         * @param flag either XAResource.TMNOFLAGS or XAResource.TMRESUME
-         * @throws XAException if the connection is already enlisted in another transaction, or if auto-commit
-         *                     could not be disabled
+         * @param xid
+         *            the id of the transaction branch for this connection
+         * @param flag
+         *            either XAResource.TMNOFLAGS or XAResource.TMRESUME
+         * @throws XAException
+         *             if the connection is already enlisted in another transaction, or if auto-commit could not be
+         *             disabled
          */
         @Override
         public synchronized void start(final Xid xid, final int flag) throws XAException {
@@ -134,13 +140,15 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
                 try {
                     connection.setAutoCommit(false);
                 } catch (final SQLException e) {
-                    throw (XAException) new XAException("Count not turn off auto commit for a XA transaction").initCause(e);
+                    throw (XAException) new XAException("Count not turn off auto commit for a XA transaction")
+                            .initCause(e);
                 }
 
                 this.currentXid = xid;
             } else if (flag == XAResource.TMRESUME) {
                 if (!xid.equals(this.currentXid)) {
-                    throw new XAException("Attempting to resume in different transaction: expected " + this.currentXid + ", but was " + xid);
+                    throw new XAException("Attempting to resume in different transaction: expected " + this.currentXid
+                            + ", but was " + xid);
                 }
             } else {
                 throw new XAException("Unknown start flag " + flag);
@@ -150,9 +158,12 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         /**
          * This method does nothing.
          *
-         * @param xid  the id of the transaction branch for this connection
-         * @param flag ignored
-         * @throws XAException if the connection is already enlisted in another transaction
+         * @param xid
+         *            the id of the transaction branch for this connection
+         * @param flag
+         *            ignored
+         * @throws XAException
+         *             if the connection is already enlisted in another transaction
          */
         @Override
         public synchronized void end(final Xid xid, final int flag) throws XAException {
@@ -162,17 +173,18 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
             }
 
             // This notification tells us that the application server is done using this
-            // connection for the time being.  The connection is still associated with an
+            // connection for the time being. The connection is still associated with an
             // open transaction, so we must still wait for the commit or rollback method
         }
 
         /**
-         * This method does nothing since the LocalXAConnection does not support two-phase-commit.  This method
-         * will return XAResource.XA_RDONLY if the connection isReadOnly().  This assumes that the physical
-         * connection is wrapped with a proxy that prevents an application from changing the read-only flag
-         * while enrolled in a transaction.
+         * This method does nothing since the LocalXAConnection does not support two-phase-commit. This method will
+         * return XAResource.XA_RDONLY if the connection isReadOnly(). This assumes that the physical connection is
+         * wrapped with a proxy that prevents an application from changing the read-only flag while enrolled in a
+         * transaction.
          *
-         * @param xid the id of the transaction branch for this connection
+         * @param xid
+         *            the id of the transaction branch for this connection
          * @return XAResource.XA_RDONLY if the connection.isReadOnly(); XAResource.XA_OK otherwise
          */
         @Override
@@ -199,9 +211,12 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         /**
          * Commits the transaction and restores the original auto commit setting.
          *
-         * @param xid  the id of the transaction branch for this connection
-         * @param flag ignored
-         * @throws XAException if connection.commit() throws a SQLException
+         * @param xid
+         *            the id of the transaction branch for this connection
+         * @param flag
+         *            ignored
+         * @throws XAException
+         *             if connection.commit() throws a SQLException
          */
         @Override
         public synchronized void commit(final Xid xid, final boolean flag) throws XAException {
@@ -210,8 +225,7 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
                 throw new XAException("There is no current transaction");
             }
             if (!this.currentXid.equals(xid)) {
-                throw new XAException("Invalid Xid: expected " +
-                        this.currentXid + ", but was " + xid);
+                throw new XAException("Invalid Xid: expected " + this.currentXid + ", but was " + xid);
             }
 
             try {
@@ -239,8 +253,10 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         /**
          * Rolls back the transaction and restores the original auto commit setting.
          *
-         * @param xid the id of the transaction branch for this connection
-         * @throws XAException if connection.rollback() throws a SQLException
+         * @param xid
+         *            the id of the transaction branch for this connection
+         * @throws XAException
+         *             if connection.rollback() throws a SQLException
          */
         @Override
         public synchronized void rollback(final Xid xid) throws XAException {
@@ -265,7 +281,8 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         /**
          * Returns true if the specified XAResource == this XAResource.
          *
-         * @param xaResource the XAResource to test
+         * @param xaResource
+         *            the XAResource to test
          * @return true if the specified XAResource == this XAResource; false otherwise
          */
         @Override
@@ -276,7 +293,8 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         /**
          * Clears the currently associated transaction if it is the specified xid.
          *
-         * @param xid the id of the transaction to forget
+         * @param xid
+         *            the id of the transaction to forget
          */
         @Override
         public synchronized void forget(final Xid xid) {
@@ -286,9 +304,11 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         }
 
         /**
-         * Always returns a zero length Xid array.  The LocalXAConnectionFactory can not support recovery, so no xids will ever be found.
+         * Always returns a zero length Xid array. The LocalXAConnectionFactory can not support recovery, so no xids
+         * will ever be found.
          *
-         * @param flag ignored since recovery is not supported
+         * @param flag
+         *            ignored since recovery is not supported
          * @return always a zero length Xid array.
          */
         @Override
@@ -309,7 +329,8 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
         /**
          * Always returns false since we have no way to set a transaction timeout on a JDBC connection.
          *
-         * @param transactionTimeout ignored since we have no way to set a transaction timeout on a JDBC connection
+         * @param transactionTimeout
+         *            ignored since we have no way to set a transaction timeout on a JDBC connection
          * @return always false
          */
         @Override

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
index fa8f577..3d0289f 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
@@ -52,8 +52,7 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
     private boolean isSharedConnection;
     private final Lock lock;
 
-    public ManagedConnection(final ObjectPool<C> pool,
-            final TransactionRegistry transactionRegistry,
+    public ManagedConnection(final ObjectPool<C> pool, final TransactionRegistry transactionRegistry,
             final boolean accessToUnderlyingConnectionAllowed) throws SQLException {
         super(null);
         this.pool = pool;
@@ -80,7 +79,7 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
             }
             // transaction should have been cleared up by TransactionContextListener, but in
             // rare cases another lister could have registered which uses the connection before
-            // our listener is called.  In that rare case, trigger the transaction complete call now
+            // our listener is called. In that rare case, trigger the transaction complete call now
             transactionComplete();
         }
 
@@ -115,8 +114,7 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
             // always be of type C since it has been shared by another
             // connection from the same pool.
             @SuppressWarnings("unchecked")
-            final
-            C shared = (C) transactionContext.getSharedConnection();
+            final C shared = (C) transactionContext.getSharedConnection();
             setDelegate(shared);
 
             // remember that we are using a shared connection so it can be cleared after the
@@ -183,8 +181,8 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
     }
 
     /**
-     * Delegates to {@link ManagedConnection#transactionComplete()}
-     * for transaction completion events.
+     * Delegates to {@link ManagedConnection#transactionComplete()} for transaction completion events.
+     * 
      * @since 2.0
      */
     protected class CompletionListener implements TransactionContextListener {
@@ -238,7 +236,6 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
         super.setAutoCommit(autoCommit);
     }
 
-
     @Override
     public void commit() throws SQLException {
         if (transactionContext != null) {
@@ -255,7 +252,6 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
         super.rollback();
     }
 
-
     @Override
     public void setReadOnly(final boolean readOnly) throws SQLException {
         if (transactionContext != null) {
@@ -270,6 +266,7 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
 
     /**
      * If false, getDelegate() and getInnermostDelegate() will return null.
+     * 
      * @return if false, getDelegate() and getInnermostDelegate() will return null
      */
     public boolean isAccessToUnderlyingConnectionAllowed() {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java b/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
index 1c31fdd..a73db72 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
@@ -27,39 +27,40 @@ import java.util.Objects;
 /**
  * The ManagedDataSource is a PoolingDataSource that creates ManagedConnections.
  *
- * @param <C> The kind of {@link Connection} to manage.
+ * @param <C>
+ *            The kind of {@link Connection} to manage.
  * @since 2.0
  */
 public class ManagedDataSource<C extends Connection> extends PoolingDataSource<C> {
     private TransactionRegistry transactionRegistry;
 
     /**
-     * Creates a ManagedDataSource which obtains connections from the specified pool and
-     * manages them using the specified transaction registry.  The TransactionRegistry must
-     * be the transaction registry obtained from the XAConnectionFactory used to create
-     * the connection pool.  If not, an error will occur when attempting to use the connection
-     * in a global transaction because the XAResource object associated with the connection
-     * will be unavailable.
+     * Creates a ManagedDataSource which obtains connections from the specified pool and manages them using the
+     * specified transaction registry. The TransactionRegistry must be the transaction registry obtained from the
+     * XAConnectionFactory used to create the connection pool. If not, an error will occur when attempting to use the
+     * connection in a global transaction because the XAResource object associated with the connection will be
+     * unavailable.
      *
-     * @param pool the connection pool
-     * @param transactionRegistry the transaction registry obtained from the
-     * XAConnectionFactory used to create the connection pool object factory
+     * @param pool
+     *            the connection pool
+     * @param transactionRegistry
+     *            the transaction registry obtained from the XAConnectionFactory used to create the connection pool
+     *            object factory
      */
-    public ManagedDataSource(final ObjectPool<C> pool,
-            final TransactionRegistry transactionRegistry) {
+    public ManagedDataSource(final ObjectPool<C> pool, final TransactionRegistry transactionRegistry) {
         super(pool);
         this.transactionRegistry = transactionRegistry;
     }
 
     /**
-     * Sets the transaction registry from the XAConnectionFactory used to create the pool.
-     * The transaction registry can only be set once using either a connector or this setter
-     * method.
-     * @param transactionRegistry the transaction registry acquired from the XAConnectionFactory
-     * used to create the pool
+     * Sets the transaction registry from the XAConnectionFactory used to create the pool. The transaction registry can
+     * only be set once using either a connector or this setter method.
+     * 
+     * @param transactionRegistry
+     *            the transaction registry acquired from the XAConnectionFactory used to create the pool
      */
     public void setTransactionRegistry(final TransactionRegistry transactionRegistry) {
-        if(this.transactionRegistry != null) {
+        if (this.transactionRegistry != null) {
             throw new IllegalStateException("TransactionRegistry already set");
         }
         Objects.requireNonNull(transactionRegistry, "transactionRegistry is null");
@@ -76,7 +77,8 @@ public class ManagedDataSource<C extends Connection> extends PoolingDataSource<C
             throw new IllegalStateException("TransactionRegistry has not been set");
         }
 
-        final Connection connection = new ManagedConnection<>(getPool(), transactionRegistry, isAccessToUnderlyingConnectionAllowed());
+        final Connection connection = new ManagedConnection<>(getPool(), transactionRegistry,
+                isAccessToUnderlyingConnectionAllowed());
         return connection;
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java
index c35c8b1..7eba6e7 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnection.java
@@ -33,39 +33,43 @@ import org.apache.commons.pool2.ObjectPool;
 public class PoolableManagedConnection extends PoolableConnection {
     private final TransactionRegistry transactionRegistry;
 
-
     /**
      * Create a PoolableManagedConnection.
      *
-     * @param transactionRegistry transaction registry
-     * @param conn underlying connection
-     * @param pool connection pool
+     * @param transactionRegistry
+     *            transaction registry
+     * @param conn
+     *            underlying connection
+     * @param pool
+     *            connection pool
      */
-    public PoolableManagedConnection(final TransactionRegistry transactionRegistry,
-            final Connection conn, final ObjectPool<PoolableConnection> pool) {
+    public PoolableManagedConnection(final TransactionRegistry transactionRegistry, final Connection conn,
+            final ObjectPool<PoolableConnection> pool) {
         this(transactionRegistry, conn, pool, null, false);
     }
 
-
     /**
      * Create a PoolableManagedConnection.
      *
-     * @param transactionRegistry transaction registry
-     * @param conn underlying connection
-     * @param pool connection pool
-     * @param disconnectSqlCodes SQL_STATE codes considered fatal disconnection errors
-     * @param fastFailValidation true means fatal disconnection errors cause subsequent
-     *        validations to fail immediately (no attempt to run query or isValid)
+     * @param transactionRegistry
+     *            transaction registry
+     * @param conn
+     *            underlying connection
+     * @param pool
+     *            connection pool
+     * @param disconnectSqlCodes
+     *            SQL_STATE codes considered fatal disconnection errors
+     * @param fastFailValidation
+     *            true means fatal disconnection errors cause subsequent validations to fail immediately (no attempt to
+     *            run query or isValid)
      */
-    public PoolableManagedConnection(final TransactionRegistry transactionRegistry,
-            final Connection conn, final ObjectPool<PoolableConnection> pool,
-            final Collection<String> disconnectSqlCodes,
+    public PoolableManagedConnection(final TransactionRegistry transactionRegistry, final Connection conn,
+            final ObjectPool<PoolableConnection> pool, final Collection<String> disconnectSqlCodes,
             final boolean fastFailValidation) {
         super(conn, pool, null, disconnectSqlCodes, fastFailValidation);
         this.transactionRegistry = transactionRegistry;
     }
 
-
     /**
      * Actually close the underlying connection.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
index 69e1842..6b23804 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/PoolableManagedConnectionFactory.java
@@ -16,6 +16,7 @@
  */
 
 package org.apache.commons.dbcp2.managed;
+
 import java.sql.Connection;
 
 import javax.management.ObjectName;

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
index 00a0121..dfb6ebd 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
@@ -29,10 +29,9 @@ import java.util.Objects;
 import java.lang.ref.WeakReference;
 
 /**
- * TransactionContext represents the association between a single XAConnectionFactory and a Transaction.
- * This context contains a single shared connection which should be used by all ManagedConnections for
- * the XAConnectionFactory, the ability to listen for the transaction completion event, and a method
- * to check the status of the transaction.
+ * TransactionContext represents the association between a single XAConnectionFactory and a Transaction. This context
+ * contains a single shared connection which should be used by all ManagedConnections for the XAConnectionFactory, the
+ * ability to listen for the transaction completion event, and a method to check the status of the transaction.
  *
  * @since 2.0
  */
@@ -43,13 +42,13 @@ public class TransactionContext {
     private boolean transactionComplete;
 
     /**
-     * Creates a TransactionContext for the specified Transaction and TransactionRegistry.  The
-     * TransactionRegistry is used to obtain the XAResource for the shared connection when it is
-     * enlisted in the transaction.
+     * Creates a TransactionContext for the specified Transaction and TransactionRegistry. The TransactionRegistry is
+     * used to obtain the XAResource for the shared connection when it is enlisted in the transaction.
      *
-     * @param transactionRegistry the TransactionRegistry used to obtain the XAResource for the
-     * shared connection
-     * @param transaction the transaction
+     * @param transactionRegistry
+     *            the TransactionRegistry used to obtain the XAResource for the shared connection
+     * @param transaction
+     *            the transaction
      */
     public TransactionContext(final TransactionRegistry transactionRegistry, final Transaction transaction) {
         Objects.requireNonNull(transactionRegistry, "transactionRegistry is null");
@@ -60,9 +59,9 @@ public class TransactionContext {
     }
 
     /**
-     * Gets the connection shared by all ManagedConnections in the transaction.  Specifically,
-     * connection using the same XAConnectionFactory from which the TransactionRegistry was
-     * obtained.
+     * Gets the connection shared by all ManagedConnections in the transaction. Specifically, connection using the same
+     * XAConnectionFactory from which the TransactionRegistry was obtained.
+     * 
      * @return the shared connection for this transaction
      */
     public Connection getSharedConnection() {
@@ -70,13 +69,13 @@ public class TransactionContext {
     }
 
     /**
-     * Sets the shared connection for this transaction.  The shared connection is enlisted
-     * in the transaction.
+     * Sets the shared connection for this transaction. The shared connection is enlisted in the transaction.
      *
-     * @param sharedConnection the shared connection
-     * @throws SQLException if a shared connection is already set, if XAResource for the connection
-     * could not be found in the transaction registry, or if there was a problem enlisting the
-     * connection in the transaction
+     * @param sharedConnection
+     *            the shared connection
+     * @throws SQLException
+     *             if a shared connection is already set, if XAResource for the connection could not be found in the
+     *             transaction registry, or if there was a problem enlisting the connection in the transaction
      */
     public void setSharedConnection(final Connection sharedConnection) throws SQLException {
         if (this.sharedConnection != null) {
@@ -88,7 +87,7 @@ public class TransactionContext {
         final Transaction transaction = getTransaction();
         try {
             final XAResource xaResource = transactionRegistry.getXAResource(sharedConnection);
-            if ( !transaction.enlistResource(xaResource) ) {
+            if (!transaction.enlistResource(xaResource)) {
                 throw new SQLException("Unable to enlist connection in transaction: enlistResource returns 'false'.");
             }
         } catch (final IllegalStateException e) {
@@ -106,8 +105,10 @@ public class TransactionContext {
     /**
      * Adds a listener for transaction completion events.
      *
-     * @param listener the listener to add
-     * @throws SQLException if a problem occurs adding the listener to the transaction
+     * @param listener
+     *            the listener to add
+     * @throws SQLException
+     *             if a problem occurs adding the listener to the transaction
      */
     public void addTransactionContextListener(final TransactionContextListener listener) throws SQLException {
         try {
@@ -132,8 +133,10 @@ public class TransactionContext {
 
     /**
      * True if the transaction is active or marked for rollback only.
+     * 
      * @return true if the transaction is active or marked for rollback only; false otherwise
-     * @throws SQLException if a problem occurs obtaining the transaction status
+     * @throws SQLException
+     *             if a problem occurs obtaining the transaction status
      */
     public boolean isActive() throws SQLException {
         try {
@@ -166,7 +169,7 @@ public class TransactionContext {
     }
 
     /**
-     * Gets the transaction  complete flag to true.
+     * Gets the transaction complete flag to true.
      *
      * @return The transaction complete flag.
      *

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
index 8637097..8506d28 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
@@ -25,8 +25,11 @@ package org.apache.commons.dbcp2.managed;
 public interface TransactionContextListener {
     /**
      * Occurs after the transaction commits or rolls back.
-     * @param transactionContext the transaction context that completed
-     * @param commited true if the transaction committed; false otherwise
+     * 
+     * @param transactionContext
+     *            the transaction context that completed
+     * @param commited
+     *            true if the transaction committed; false otherwise
      */
     void afterCompletion(TransactionContext transactionContext, boolean commited);
 }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
index 7ab3461..7715497 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
@@ -30,36 +30,38 @@ import javax.transaction.xa.XAResource;
 
 import org.apache.commons.dbcp2.DelegatingConnection;
 
-
 /**
  * TransactionRegistry tracks Connections and XAResources in a transacted environment for a single XAConnectionFactory.
  * <p>
  * The TransactionRegistry hides the details of transaction processing from the existing DBCP pooling code, and gives
  * the ManagedConnection a way to enlist connections in a transaction, allowing for the maximal rescue of DBCP.
  * </p>
+ * 
  * @since 2.0
  */
 public class TransactionRegistry {
     private final TransactionManager transactionManager;
-    private final Map<Transaction, TransactionContext> caches =
-            new WeakHashMap<>();
+    private final Map<Transaction, TransactionContext> caches = new WeakHashMap<>();
     private final Map<Connection, XAResource> xaResources = new WeakHashMap<>();
 
     /**
      * Creates a TransactionRegistry for the specified transaction manager.
-     * @param transactionManager the transaction manager used to enlist connections
+     * 
+     * @param transactionManager
+     *            the transaction manager used to enlist connections
      */
     public TransactionRegistry(final TransactionManager transactionManager) {
         this.transactionManager = transactionManager;
     }
 
     /**
-     * Registers the association between a Connection and a XAResource.  When a connection
-     * is enlisted in a transaction, it is actually the XAResource that is given to the transaction
-     * manager.
+     * Registers the association between a Connection and a XAResource. When a connection is enlisted in a transaction,
+     * it is actually the XAResource that is given to the transaction manager.
      *
-     * @param connection the JDBC connection
-     * @param xaResource the XAResource which managed the connection within a transaction
+     * @param connection
+     *            the JDBC connection
+     * @param xaResource
+     *            the XAResource which managed the connection within a transaction
      */
     public synchronized void registerConnection(final Connection connection, final XAResource xaResource) {
         Objects.requireNonNull(connection, "connection is null");
@@ -69,9 +71,12 @@ public class TransactionRegistry {
 
     /**
      * Gets the XAResource registered for the connection.
-     * @param connection the connection
+     * 
+     * @param connection
+     *            the connection
      * @return the XAResource registered for the connection; never null
-     * @throws SQLException if the connection does not have a registered XAResource
+     * @throws SQLException
+     *             if the connection does not have a registered XAResource
      */
     public synchronized XAResource getXAResource(final Connection connection) throws SQLException {
         Objects.requireNonNull(connection, "connection is null");
@@ -85,8 +90,10 @@ public class TransactionRegistry {
 
     /**
      * Gets the active TransactionContext or null if not Transaction is active.
+     * 
      * @return the active TransactionContext or null if no Transaction is active
-     * @throws SQLException if an error occurs while fetching the transaction
+     * @throws SQLException
+     *             if an error occurs while fetching the transaction
      */
     public TransactionContext getActiveTransactionContext() throws SQLException {
         Transaction transaction = null;
@@ -117,6 +124,7 @@ public class TransactionRegistry {
 
     /**
      * Unregisters a destroyed connection from {@link TransactionRegistry}
+     * 
      * @param connection
      */
     public synchronized void unregisterConnection(final Connection connection) {
@@ -124,7 +132,6 @@ public class TransactionRegistry {
         xaResources.remove(key);
     }
 
-
     private Connection getConnectionKey(final Connection connection) {
         Connection result;
         if (connection instanceof DelegatingConnection) {
@@ -135,4 +142,3 @@ public class TransactionRegistry {
         return result;
     }
 }
-

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0a928ca2/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
index 39ca074..09d4af9 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/XAConnectionFactory.java
@@ -23,19 +23,17 @@ import java.sql.SQLException;
 import org.apache.commons.dbcp2.ConnectionFactory;
 
 /**
- * XAConnectionFactory is an extension of ConnectionFactory used to create connections
- * in a transaction managed environment.  The XAConnectionFactory operates like a normal
- * ConnectionFactory except a TransactionRegistry is provided from which the XAResource
- * for a connection can be obtained.  This allows the existing DBCP pool code to work with
- * XAConnections and gives a the ManagedConnection a way to enlist a connection in the
- * the transaction.
+ * XAConnectionFactory is an extension of ConnectionFactory used to create connections in a transaction managed
+ * environment. The XAConnectionFactory operates like a normal ConnectionFactory except a TransactionRegistry is
+ * provided from which the XAResource for a connection can be obtained. This allows the existing DBCP pool code to work
+ * with XAConnections and gives a the ManagedConnection a way to enlist a connection in the the transaction.
  *
  * @since 2.0
  */
 public interface XAConnectionFactory extends ConnectionFactory {
     /**
-     * Gets the TransactionRegistry for this connection factory which contains a the
-     * XAResource for every connection created by this factory.
+     * Gets the TransactionRegistry for this connection factory which contains a the XAResource for every connection
+     * created by this factory.
      *
      * @return the transaction registry for this connection factory
      */
@@ -44,13 +42,13 @@ public interface XAConnectionFactory extends ConnectionFactory {
     /**
      * Create a new {@link java.sql.Connection} in an implementation specific fashion.
      * <p>
-     * An implementation can assume that the caller of this will wrap the connection in
-     * a proxy that protects access to the setAutoCommit, commit and rollback when
-     * enrolled in a XA transaction.
+     * An implementation can assume that the caller of this will wrap the connection in a proxy that protects access to
+     * the setAutoCommit, commit and rollback when enrolled in a XA transaction.
      * </p>
      *
      * @return a new {@link java.sql.Connection}
-     * @throws java.sql.SQLException if a database error occurs creating the connection
+     * @throws java.sql.SQLException
+     *             if a database error occurs creating the connection
      */
     @Override
     Connection createConnection() throws SQLException;


[20/50] [abbrv] commons-dbcp git commit: Add missing Javadoc, better param names, line length 120.

Posted by gg...@apache.org.
Add missing Javadoc, better param names, line length 120.

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

Branch: refs/heads/release
Commit: 00354024c64400dfaba80873e55fa365d45b1f9f
Parents: 628e21f
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:00:07 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:00:07 2018 -0600

----------------------------------------------------------------------
 .../commons/dbcp2/DriverConnectionFactory.java  | 24 +++++++++++++++-----
 1 file changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/00354024/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
index 09f02bf..4c2686c 100644
--- a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 package org.apache.commons.dbcp2;
+
 import java.sql.Connection;
 import java.sql.Driver;
 import java.sql.SQLException;
@@ -31,19 +32,30 @@ public class DriverConnectionFactory implements ConnectionFactory {
     private final Driver driver;
     private final Properties properties;
 
-    public DriverConnectionFactory(final Driver driver, final String connectUri, final Properties props) {
+    /**
+     * Constructs a connection factory for a given Driver.
+     * 
+     * @param driver
+     *            The Driver.
+     * @param connectString
+     *            The connection string.
+     * @param properties
+     *            The connection properties.
+     */
+    public DriverConnectionFactory(final Driver driver, final String connectString, final Properties properties) {
         this.driver = driver;
-        this.connectionUri = connectUri;
-        this.properties = props;
+        this.connectionUri = connectString;
+        this.properties = properties;
     }
+
     @Override
     public Connection createConnection() throws SQLException {
-        return driver.connect(connectionUri,properties);
+        return driver.connect(connectionUri, properties);
     }
 
     @Override
     public String toString() {
-        return this.getClass().getName() + " [" + String.valueOf(driver) + ";" +
-                String.valueOf(connectionUri) + ";"  + String.valueOf(properties) + "]";
+        return this.getClass().getName() + " [" + String.valueOf(driver) + ";" + String.valueOf(connectionUri) + ";"
+                + String.valueOf(properties) + "]";
     }
 }


[24/50] [abbrv] commons-dbcp git commit: Add missing Javadoc.

Posted by gg...@apache.org.
Add missing Javadoc.

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

Branch: refs/heads/release
Commit: 5ccf73a33230857f217a8e456301c2a0e59d148b
Parents: 738aece
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:06:04 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:06:04 2018 -0600

----------------------------------------------------------------------
 .../commons/dbcp2/DelegatingResultSet.java      | 51 +++++++++++++++-----
 1 file changed, 39 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/5ccf73a3/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
index 53beeab..e50ee25 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -75,13 +75,15 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
      * {@link #wrapResultSet(Statement, ResultSet)}
      * </p>
      *
-     * @param stmt Statement which created this ResultSet
-     * @param res ResultSet to wrap
+     * @param statement
+     *            The Statement which created the ResultSet.
+     * @param resultSet
+     *            The ResultSet to wrap.
      */
-    private DelegatingResultSet(final Statement stmt, final ResultSet res) {
-        super((AbandonedTrace)stmt);
-        this.statement = stmt;
-        this.resultSet = res;
+    private DelegatingResultSet(final Statement statement, final ResultSet resultSet) {
+        super((AbandonedTrace)statement);
+        this.statement = statement;
+        this.resultSet = resultSet;
     }
 
     /**
@@ -102,20 +104,43 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
         this.resultSet = res;
     }
 
-    public static ResultSet wrapResultSet(final Statement stmt, final ResultSet rset) {
-        if(null == rset) {
+    /**
+     * Wraps the given result set in a delegate.
+     * 
+     * @param statement
+     *            The Statement which created the ResultSet.
+     * @param resultSet
+     *            The ResultSet to wrap.
+     * @return a new delegate.
+     */
+    public static ResultSet wrapResultSet(final Statement statement, final ResultSet resultSet) {
+        if (null == resultSet) {
             return null;
         }
-        return new DelegatingResultSet(stmt,rset);
+        return new DelegatingResultSet(statement, resultSet);
     }
 
-    public static ResultSet wrapResultSet(final Connection conn, final ResultSet rset) {
-        if(null == rset) {
+    /**
+     * Wraps the given result set in a delegate.
+     * 
+     * @param connection
+     *            The Connection which created the ResultSet.
+     * @param resultSet
+     *            The ResultSet to wrap.
+     * @return a new delegate.
+     */
+    public static ResultSet wrapResultSet(final Connection connection, final ResultSet resultSet) {
+        if (null == resultSet) {
             return null;
         }
-        return new DelegatingResultSet(conn,rset);
+        return new DelegatingResultSet(connection, resultSet);
     }
 
+    /**
+     * Gets my delegate.
+     * 
+     * @return my delegate.
+     */
     public ResultSet getDelegate() {
         return resultSet;
     }
@@ -136,6 +161,8 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
      * {@code DelegatingResultSet}s, and you want to make
      * sure to obtain a "genuine" {@link ResultSet}.
      * </p>
+     * 
+     * @return the innermost delegate.
      */
     public ResultSet getInnermostDelegate() {
         ResultSet r = resultSet;


[39/50] [abbrv] commons-dbcp git commit: Line length 120.

Posted by gg...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java b/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
index b20cbc5..4a36cb9 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
@@ -49,7 +49,8 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
      * @param databaseMetaData
      *            the database meta data
      */
-    public DelegatingDatabaseMetaData(final DelegatingConnection<?> connection, final DatabaseMetaData databaseMetaData) {
+    public DelegatingDatabaseMetaData(final DelegatingConnection<?> connection,
+            final DatabaseMetaData databaseMetaData) {
         super();
         this.connection = connection;
         this.databaseMetaData = databaseMetaData;
@@ -99,38 +100,62 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public boolean allProceduresAreCallable() throws SQLException {
-        try { return databaseMetaData.allProceduresAreCallable(); }
-          catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.allProceduresAreCallable();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean allTablesAreSelectable() throws SQLException {
-        try { return databaseMetaData.allTablesAreSelectable(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.allTablesAreSelectable();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
-        try { return databaseMetaData.dataDefinitionCausesTransactionCommit(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.dataDefinitionCausesTransactionCommit();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
-        try { return databaseMetaData.dataDefinitionIgnoredInTransactions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.dataDefinitionIgnoredInTransactions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean deletesAreDetected(final int type) throws SQLException {
-        try { return databaseMetaData.deletesAreDetected(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.deletesAreDetected(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
-        try { return databaseMetaData.doesMaxRowSizeIncludeBlobs(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.doesMaxRowSizeIncludeBlobs();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
@@ -161,14 +186,22 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public String getCatalogSeparator() throws SQLException {
-        try { return databaseMetaData.getCatalogSeparator(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getCatalogSeparator();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public String getCatalogTerm() throws SQLException {
-        try { return databaseMetaData.getCatalogTerm(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getCatalogTerm();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -228,50 +261,82 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public int getDatabaseMajorVersion() throws SQLException {
-        try { return databaseMetaData.getDatabaseMajorVersion(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getDatabaseMajorVersion();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getDatabaseMinorVersion() throws SQLException {
-        try { return databaseMetaData.getDatabaseMinorVersion(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getDatabaseMinorVersion();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public String getDatabaseProductName() throws SQLException {
-        try { return databaseMetaData.getDatabaseProductName(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getDatabaseProductName();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public String getDatabaseProductVersion() throws SQLException {
-        try { return databaseMetaData.getDatabaseProductVersion(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getDatabaseProductVersion();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public int getDefaultTransactionIsolation() throws SQLException {
-        try { return databaseMetaData.getDefaultTransactionIsolation(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getDefaultTransactionIsolation();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
-    public int getDriverMajorVersion() {return databaseMetaData.getDriverMajorVersion();}
+    public int getDriverMajorVersion() {
+        return databaseMetaData.getDriverMajorVersion();
+    }
 
     @Override
-    public int getDriverMinorVersion() {return databaseMetaData.getDriverMinorVersion();}
+    public int getDriverMinorVersion() {
+        return databaseMetaData.getDriverMinorVersion();
+    }
 
     @Override
     public String getDriverName() throws SQLException {
-        try { return databaseMetaData.getDriverName(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getDriverName();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public String getDriverVersion() throws SQLException {
-        try { return databaseMetaData.getDriverVersion(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getDriverVersion();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -289,14 +354,22 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public String getExtraNameCharacters() throws SQLException {
-        try { return databaseMetaData.getExtraNameCharacters(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getExtraNameCharacters();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public String getIdentifierQuoteString() throws SQLException {
-        try { return databaseMetaData.getIdentifierQuoteString(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getIdentifierQuoteString();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -327,140 +400,232 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public int getJDBCMajorVersion() throws SQLException {
-        try { return databaseMetaData.getJDBCMajorVersion(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getJDBCMajorVersion();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getJDBCMinorVersion() throws SQLException {
-        try { return databaseMetaData.getJDBCMinorVersion(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getJDBCMinorVersion();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxBinaryLiteralLength() throws SQLException {
-        try { return databaseMetaData.getMaxBinaryLiteralLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxBinaryLiteralLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxCatalogNameLength() throws SQLException {
-        try { return databaseMetaData.getMaxCatalogNameLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxCatalogNameLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxCharLiteralLength() throws SQLException {
-        try { return databaseMetaData.getMaxCharLiteralLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxCharLiteralLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxColumnNameLength() throws SQLException {
-        try { return databaseMetaData.getMaxColumnNameLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxColumnNameLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxColumnsInGroupBy() throws SQLException {
-        try { return databaseMetaData.getMaxColumnsInGroupBy(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxColumnsInGroupBy();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxColumnsInIndex() throws SQLException {
-        try { return databaseMetaData.getMaxColumnsInIndex(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxColumnsInIndex();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxColumnsInOrderBy() throws SQLException {
-        try { return databaseMetaData.getMaxColumnsInOrderBy(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxColumnsInOrderBy();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxColumnsInSelect() throws SQLException {
-        try { return databaseMetaData.getMaxColumnsInSelect(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxColumnsInSelect();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxColumnsInTable() throws SQLException {
-        try { return databaseMetaData.getMaxColumnsInTable(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxColumnsInTable();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxConnections() throws SQLException {
-        try { return databaseMetaData.getMaxConnections(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxConnections();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxCursorNameLength() throws SQLException {
-        try { return databaseMetaData.getMaxCursorNameLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxCursorNameLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxIndexLength() throws SQLException {
-        try { return databaseMetaData.getMaxIndexLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxIndexLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxProcedureNameLength() throws SQLException {
-        try { return databaseMetaData.getMaxProcedureNameLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxProcedureNameLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxRowSize() throws SQLException {
-        try { return databaseMetaData.getMaxRowSize(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxRowSize();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxSchemaNameLength() throws SQLException {
-        try { return databaseMetaData.getMaxSchemaNameLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxSchemaNameLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxStatementLength() throws SQLException {
-        try { return databaseMetaData.getMaxStatementLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxStatementLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxStatements() throws SQLException {
-        try { return databaseMetaData.getMaxStatements(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxStatements();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxTableNameLength() throws SQLException {
-        try { return databaseMetaData.getMaxTableNameLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxTableNameLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxTablesInSelect() throws SQLException {
-        try { return databaseMetaData.getMaxTablesInSelect(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxTablesInSelect();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public int getMaxUserNameLength() throws SQLException {
-        try { return databaseMetaData.getMaxUserNameLength(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getMaxUserNameLength();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public String getNumericFunctions() throws SQLException {
-        try { return databaseMetaData.getNumericFunctions(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getNumericFunctions();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -490,8 +655,12 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public String getProcedureTerm() throws SQLException {
-        try { return databaseMetaData.getProcedureTerm(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getProcedureTerm();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -509,26 +678,42 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public int getResultSetHoldability() throws SQLException {
-        try { return databaseMetaData.getResultSetHoldability(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getResultSetHoldability();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public String getSQLKeywords() throws SQLException {
-        try { return databaseMetaData.getSQLKeywords(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getSQLKeywords();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public int getSQLStateType() throws SQLException {
-        try { return databaseMetaData.getSQLStateType(); }
-        catch (final SQLException e) { handleException(e); return 0; }
+        try {
+            return databaseMetaData.getSQLStateType();
+        } catch (final SQLException e) {
+            handleException(e);
+            return 0;
+        }
     }
 
     @Override
     public String getSchemaTerm() throws SQLException {
-        try { return databaseMetaData.getSchemaTerm(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getSchemaTerm();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -544,14 +729,22 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public String getSearchStringEscape() throws SQLException {
-        try { return databaseMetaData.getSearchStringEscape(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getSearchStringEscape();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public String getStringFunctions() throws SQLException {
-        try { return databaseMetaData.getStringFunctions(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getStringFunctions();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -582,8 +775,12 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public String getSystemFunctions() throws SQLException {
-        try { return databaseMetaData.getSystemFunctions(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getSystemFunctions();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -625,8 +822,12 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public String getTimeDateFunctions() throws SQLException {
-        try { return databaseMetaData.getTimeDateFunctions(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getTimeDateFunctions();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -641,15 +842,13 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
     }
 
     @Override
-    public ResultSet getUDTs(final String catalog, final String schemaPattern,
-            final String typeNamePattern, final int[] types) throws SQLException {
+    public ResultSet getUDTs(final String catalog, final String schemaPattern, final String typeNamePattern,
+            final int[] types) throws SQLException {
         connection.checkOpen();
         try {
             return DelegatingResultSet.wrapResultSet(connection,
-                    databaseMetaData.getUDTs(catalog, schemaPattern, typeNamePattern,
-                            types));
-        }
-        catch (final SQLException e) {
+                    databaseMetaData.getUDTs(catalog, schemaPattern, typeNamePattern, types));
+        } catch (final SQLException e) {
             handleException(e);
             throw new AssertionError();
         }
@@ -657,14 +856,22 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public String getURL() throws SQLException {
-        try { return databaseMetaData.getURL(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getURL();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
     public String getUserName() throws SQLException {
-        try { return databaseMetaData.getUserName(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getUserName();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -682,548 +889,902 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public boolean insertsAreDetected(final int type) throws SQLException {
-        try { return databaseMetaData.insertsAreDetected(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.insertsAreDetected(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean isCatalogAtStart() throws SQLException {
-        try { return databaseMetaData.isCatalogAtStart(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.isCatalogAtStart();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean isReadOnly() throws SQLException {
-        try { return databaseMetaData.isReadOnly(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.isReadOnly();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean locatorsUpdateCopy() throws SQLException {
-        try { return databaseMetaData.locatorsUpdateCopy(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.locatorsUpdateCopy();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean nullPlusNonNullIsNull() throws SQLException {
-        try { return databaseMetaData.nullPlusNonNullIsNull(); }
-        catch (final SQLException e) { handleException(e); return false; }
-    }
-
-    @Override
-    public boolean nullsAreSortedAtEnd() throws SQLException {
-        try { return databaseMetaData.nullsAreSortedAtEnd(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.nullPlusNonNullIsNull();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
+    }
+
+    @Override
+    public boolean nullsAreSortedAtEnd() throws SQLException {
+        try {
+            return databaseMetaData.nullsAreSortedAtEnd();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean nullsAreSortedAtStart() throws SQLException {
-        try { return databaseMetaData.nullsAreSortedAtStart(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.nullsAreSortedAtStart();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean nullsAreSortedHigh() throws SQLException {
-        try { return databaseMetaData.nullsAreSortedHigh(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.nullsAreSortedHigh();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean nullsAreSortedLow() throws SQLException {
-        try { return databaseMetaData.nullsAreSortedLow(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.nullsAreSortedLow();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean othersDeletesAreVisible(final int type) throws SQLException {
-        try { return databaseMetaData.othersDeletesAreVisible(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.othersDeletesAreVisible(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean othersInsertsAreVisible(final int type) throws SQLException {
-        try { return databaseMetaData.othersInsertsAreVisible(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.othersInsertsAreVisible(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean othersUpdatesAreVisible(final int type) throws SQLException {
-        try { return databaseMetaData.othersUpdatesAreVisible(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.othersUpdatesAreVisible(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean ownDeletesAreVisible(final int type) throws SQLException {
-        try { return databaseMetaData.ownDeletesAreVisible(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.ownDeletesAreVisible(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean ownInsertsAreVisible(final int type) throws SQLException {
-        try { return databaseMetaData.ownInsertsAreVisible(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.ownInsertsAreVisible(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean ownUpdatesAreVisible(final int type) throws SQLException {
-        try { return databaseMetaData.ownUpdatesAreVisible(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.ownUpdatesAreVisible(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean storesLowerCaseIdentifiers() throws SQLException {
-        try { return databaseMetaData.storesLowerCaseIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.storesLowerCaseIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
-        try { return databaseMetaData.storesLowerCaseQuotedIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.storesLowerCaseQuotedIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean storesMixedCaseIdentifiers() throws SQLException {
-        try { return databaseMetaData.storesMixedCaseIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.storesMixedCaseIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
-        try { return databaseMetaData.storesMixedCaseQuotedIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.storesMixedCaseQuotedIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean storesUpperCaseIdentifiers() throws SQLException {
-        try { return databaseMetaData.storesUpperCaseIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.storesUpperCaseIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
-        try { return databaseMetaData.storesUpperCaseQuotedIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.storesUpperCaseQuotedIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsANSI92EntryLevelSQL() throws SQLException {
-        try { return databaseMetaData.supportsANSI92EntryLevelSQL(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsANSI92EntryLevelSQL();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsANSI92FullSQL() throws SQLException {
-        try { return databaseMetaData.supportsANSI92FullSQL(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsANSI92FullSQL();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsANSI92IntermediateSQL() throws SQLException {
-        try { return databaseMetaData.supportsANSI92IntermediateSQL(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsANSI92IntermediateSQL();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsAlterTableWithAddColumn() throws SQLException {
-        try { return databaseMetaData.supportsAlterTableWithAddColumn(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsAlterTableWithAddColumn();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsAlterTableWithDropColumn() throws SQLException {
-        try { return databaseMetaData.supportsAlterTableWithDropColumn(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsAlterTableWithDropColumn();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsBatchUpdates() throws SQLException {
-        try { return databaseMetaData.supportsBatchUpdates(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsBatchUpdates();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsCatalogsInDataManipulation() throws SQLException {
-        try { return databaseMetaData.supportsCatalogsInDataManipulation(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsCatalogsInDataManipulation();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
-        try { return databaseMetaData.supportsCatalogsInIndexDefinitions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsCatalogsInIndexDefinitions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
-        try { return databaseMetaData.supportsCatalogsInPrivilegeDefinitions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsCatalogsInPrivilegeDefinitions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsCatalogsInProcedureCalls() throws SQLException {
-        try { return databaseMetaData.supportsCatalogsInProcedureCalls(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsCatalogsInProcedureCalls();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsCatalogsInTableDefinitions() throws SQLException {
-        try { return databaseMetaData.supportsCatalogsInTableDefinitions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsCatalogsInTableDefinitions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsColumnAliasing() throws SQLException {
-        try { return databaseMetaData.supportsColumnAliasing(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsColumnAliasing();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsConvert() throws SQLException {
-        try { return databaseMetaData.supportsConvert(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsConvert();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
-    public boolean supportsConvert(final int fromType, final int toType)
-            throws SQLException {
-        try { return databaseMetaData.supportsConvert(fromType, toType); }
-        catch (final SQLException e) { handleException(e); return false; }
+    public boolean supportsConvert(final int fromType, final int toType) throws SQLException {
+        try {
+            return databaseMetaData.supportsConvert(fromType, toType);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsCoreSQLGrammar() throws SQLException {
-        try { return databaseMetaData.supportsCoreSQLGrammar(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsCoreSQLGrammar();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsCorrelatedSubqueries() throws SQLException {
-        try { return databaseMetaData.supportsCorrelatedSubqueries(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsCorrelatedSubqueries();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
-    public boolean supportsDataDefinitionAndDataManipulationTransactions()
-            throws SQLException {
-        try { return databaseMetaData.supportsDataDefinitionAndDataManipulationTransactions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+    public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException {
+        try {
+            return databaseMetaData.supportsDataDefinitionAndDataManipulationTransactions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
-    public boolean supportsDataManipulationTransactionsOnly()
-            throws SQLException {
-        try { return databaseMetaData.supportsDataManipulationTransactionsOnly(); }
-        catch (final SQLException e) { handleException(e); return false; }
+    public boolean supportsDataManipulationTransactionsOnly() throws SQLException {
+        try {
+            return databaseMetaData.supportsDataManipulationTransactionsOnly();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsDifferentTableCorrelationNames() throws SQLException {
-        try { return databaseMetaData.supportsDifferentTableCorrelationNames(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsDifferentTableCorrelationNames();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsExpressionsInOrderBy() throws SQLException {
-        try { return databaseMetaData.supportsExpressionsInOrderBy(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsExpressionsInOrderBy();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsExtendedSQLGrammar() throws SQLException {
-        try { return databaseMetaData.supportsExtendedSQLGrammar(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsExtendedSQLGrammar();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsFullOuterJoins() throws SQLException {
-        try { return databaseMetaData.supportsFullOuterJoins(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsFullOuterJoins();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsGetGeneratedKeys() throws SQLException {
-        try { return databaseMetaData.supportsGetGeneratedKeys(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsGetGeneratedKeys();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsGroupBy() throws SQLException {
-        try { return databaseMetaData.supportsGroupBy(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsGroupBy();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsGroupByBeyondSelect() throws SQLException {
-        try { return databaseMetaData.supportsGroupByBeyondSelect(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsGroupByBeyondSelect();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsGroupByUnrelated() throws SQLException {
-        try { return databaseMetaData.supportsGroupByUnrelated(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsGroupByUnrelated();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsIntegrityEnhancementFacility() throws SQLException {
-        try { return databaseMetaData.supportsIntegrityEnhancementFacility(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsIntegrityEnhancementFacility();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsLikeEscapeClause() throws SQLException {
-        try { return databaseMetaData.supportsLikeEscapeClause(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsLikeEscapeClause();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsLimitedOuterJoins() throws SQLException {
-        try { return databaseMetaData.supportsLimitedOuterJoins(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsLimitedOuterJoins();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsMinimumSQLGrammar() throws SQLException {
-        try { return databaseMetaData.supportsMinimumSQLGrammar(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsMinimumSQLGrammar();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsMixedCaseIdentifiers() throws SQLException {
-        try { return databaseMetaData.supportsMixedCaseIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsMixedCaseIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
-        try { return databaseMetaData.supportsMixedCaseQuotedIdentifiers(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsMixedCaseQuotedIdentifiers();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsMultipleOpenResults() throws SQLException {
-        try { return databaseMetaData.supportsMultipleOpenResults(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsMultipleOpenResults();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsMultipleResultSets() throws SQLException {
-        try { return databaseMetaData.supportsMultipleResultSets(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsMultipleResultSets();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsMultipleTransactions() throws SQLException {
-        try { return databaseMetaData.supportsMultipleTransactions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsMultipleTransactions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsNamedParameters() throws SQLException {
-        try { return databaseMetaData.supportsNamedParameters(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsNamedParameters();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsNonNullableColumns() throws SQLException {
-        try { return databaseMetaData.supportsNonNullableColumns(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsNonNullableColumns();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
-        try { return databaseMetaData.supportsOpenCursorsAcrossCommit(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsOpenCursorsAcrossCommit();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
-        try { return databaseMetaData.supportsOpenCursorsAcrossRollback(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsOpenCursorsAcrossRollback();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
-        try { return databaseMetaData.supportsOpenStatementsAcrossCommit(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsOpenStatementsAcrossCommit();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
-        try { return databaseMetaData.supportsOpenStatementsAcrossRollback(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsOpenStatementsAcrossRollback();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsOrderByUnrelated() throws SQLException {
-        try { return databaseMetaData.supportsOrderByUnrelated(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsOrderByUnrelated();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsOuterJoins() throws SQLException {
-        try { return databaseMetaData.supportsOuterJoins(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsOuterJoins();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsPositionedDelete() throws SQLException {
-        try { return databaseMetaData.supportsPositionedDelete(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsPositionedDelete();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsPositionedUpdate() throws SQLException {
-        try { return databaseMetaData.supportsPositionedUpdate(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsPositionedUpdate();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
-    public boolean supportsResultSetConcurrency(final int type, final int concurrency)
-            throws SQLException {
-        try { return databaseMetaData.supportsResultSetConcurrency(type, concurrency); }
-        catch (final SQLException e) { handleException(e); return false; }
+    public boolean supportsResultSetConcurrency(final int type, final int concurrency) throws SQLException {
+        try {
+            return databaseMetaData.supportsResultSetConcurrency(type, concurrency);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
-    public boolean supportsResultSetHoldability(final int holdability)
-            throws SQLException {
-        try { return databaseMetaData.supportsResultSetHoldability(holdability); }
-        catch (final SQLException e) { handleException(e); return false; }
+    public boolean supportsResultSetHoldability(final int holdability) throws SQLException {
+        try {
+            return databaseMetaData.supportsResultSetHoldability(holdability);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsResultSetType(final int type) throws SQLException {
-        try { return databaseMetaData.supportsResultSetType(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsResultSetType(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSavepoints() throws SQLException {
-        try { return databaseMetaData.supportsSavepoints(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSavepoints();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSchemasInDataManipulation() throws SQLException {
-        try { return databaseMetaData.supportsSchemasInDataManipulation(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSchemasInDataManipulation();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSchemasInIndexDefinitions() throws SQLException {
-        try { return databaseMetaData.supportsSchemasInIndexDefinitions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSchemasInIndexDefinitions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
-        try { return databaseMetaData.supportsSchemasInPrivilegeDefinitions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSchemasInPrivilegeDefinitions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSchemasInProcedureCalls() throws SQLException {
-        try { return databaseMetaData.supportsSchemasInProcedureCalls(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSchemasInProcedureCalls();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSchemasInTableDefinitions() throws SQLException {
-        try { return databaseMetaData.supportsSchemasInTableDefinitions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSchemasInTableDefinitions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSelectForUpdate() throws SQLException {
-        try { return databaseMetaData.supportsSelectForUpdate(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSelectForUpdate();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsStatementPooling() throws SQLException {
-        try { return databaseMetaData.supportsStatementPooling(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsStatementPooling();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsStoredProcedures() throws SQLException {
-        try { return databaseMetaData.supportsStoredProcedures(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsStoredProcedures();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSubqueriesInComparisons() throws SQLException {
-        try { return databaseMetaData.supportsSubqueriesInComparisons(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSubqueriesInComparisons();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSubqueriesInExists() throws SQLException {
-        try { return databaseMetaData.supportsSubqueriesInExists(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSubqueriesInExists();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSubqueriesInIns() throws SQLException {
-        try { return databaseMetaData.supportsSubqueriesInIns(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSubqueriesInIns();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsSubqueriesInQuantifieds() throws SQLException {
-        try { return databaseMetaData.supportsSubqueriesInQuantifieds(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsSubqueriesInQuantifieds();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsTableCorrelationNames() throws SQLException {
-        try { return databaseMetaData.supportsTableCorrelationNames(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsTableCorrelationNames();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
-    public boolean supportsTransactionIsolationLevel(final int level)
-            throws SQLException {
-        try { return databaseMetaData.supportsTransactionIsolationLevel(level); }
-        catch (final SQLException e) { handleException(e); return false; }
+    public boolean supportsTransactionIsolationLevel(final int level) throws SQLException {
+        try {
+            return databaseMetaData.supportsTransactionIsolationLevel(level);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsTransactions() throws SQLException {
-        try { return databaseMetaData.supportsTransactions(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsTransactions();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsUnion() throws SQLException {
-        try { return databaseMetaData.supportsUnion(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsUnion();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsUnionAll() throws SQLException {
-        try { return databaseMetaData.supportsUnionAll(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsUnionAll();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean updatesAreDetected(final int type) throws SQLException {
-        try { return databaseMetaData.updatesAreDetected(type); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.updatesAreDetected(type);
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean usesLocalFilePerTable() throws SQLException {
-        try { return databaseMetaData.usesLocalFilePerTable(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.usesLocalFilePerTable();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean usesLocalFiles() throws SQLException {
-        try { return databaseMetaData.usesLocalFiles(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.usesLocalFiles();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     /* JDBC_4_ANT_KEY_BEGIN */
@@ -1252,8 +1813,12 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public RowIdLifetime getRowIdLifetime() throws SQLException {
-        try { return databaseMetaData.getRowIdLifetime(); }
-        catch (final SQLException e) { handleException(e); throw new AssertionError(); }
+        try {
+            return databaseMetaData.getRowIdLifetime();
+        } catch (final SQLException e) {
+            handleException(e);
+            throw new AssertionError();
+        }
     }
 
     @Override
@@ -1269,14 +1834,22 @@ public class DelegatingDatabaseMetaData implements DatabaseMetaData {
 
     @Override
     public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
-        try { return databaseMetaData.autoCommitFailureClosesAllResultSets(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.autoCommitFailureClosesAllResultSets();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override
     public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
-        try { return databaseMetaData.supportsStoredFunctionsUsingCallSyntax(); }
-        catch (final SQLException e) { handleException(e); return false; }
+        try {
+            return databaseMetaData.supportsStoredFunctionsUsingCallSyntax();
+        } catch (final SQLException e) {
+            handleException(e);
+            return false;
+        }
     }
 
     @Override


[28/50] [abbrv] commons-dbcp git commit: Javadoc and suppress a compiler warning.

Posted by gg...@apache.org.
Javadoc and suppress a compiler warning.

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

Branch: refs/heads/release
Commit: 9eb1e02873e9b56c55ac6b0bd253d5193de15b9c
Parents: 012b164
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:18:11 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:18:11 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/PoolingDriver.java | 34 ++++++++++++++++++++
 1 file changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/9eb1e028/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
index 730d9ba..4272943 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
@@ -56,6 +56,9 @@ public class PoolingDriver implements Driver {
     /** Controls access to the underlying connection */
     private final boolean accessToUnderlyingConnectionAllowed;
 
+    /**
+     * Constructs a new driver with <code>accessToUnderlyingConnectionAllowed</code> enabled.
+     */
     public PoolingDriver() {
         this(true);
     }
@@ -77,6 +80,15 @@ public class PoolingDriver implements Driver {
         return accessToUnderlyingConnectionAllowed;
     }
 
+    /**
+     * Gets the connection pool for the given name.
+     * 
+     * @param name
+     *            The pool name
+     * @return The pool
+     * @throws SQLException
+     *             Thrown when the named pool is not registered.
+     */
     public synchronized ObjectPool<? extends Connection> getConnectionPool(final String name)
             throws SQLException {
         final ObjectPool<? extends Connection> pool = pools.get(name);
@@ -86,12 +98,29 @@ public class PoolingDriver implements Driver {
         return pool;
     }
 
+    /**
+     * Registers a named pool.
+     * 
+     * @param name
+     *            The pool name.
+     * @param pool
+     *            The pool.
+     */
     public synchronized void registerPool(final String name,
             final ObjectPool<? extends Connection> pool) {
         pools.put(name, pool);
     }
 
+    /**
+     * Closes a named pool.
+     * 
+     * @param name
+     *            The pool name.
+     * @throws SQLException
+     *             Thrown when a problem is caught closing the pool.
+     */
     public synchronized void closePool(final String name) throws SQLException {
+        @SuppressWarnings("resource")
         final ObjectPool<? extends Connection> pool = pools.get(name);
         if (pool != null) {
             pools.remove(name);
@@ -104,6 +133,11 @@ public class PoolingDriver implements Driver {
         }
     }
 
+    /**
+     * Gets the pool names.
+     * 
+     * @return the pool names.
+     */
     public synchronized String[] getPoolNames(){
         final Set<String> names = pools.keySet();
         return names.toArray(new String[names.size()]);


[13/50] [abbrv] commons-dbcp git commit: Comment empty block.

Posted by gg...@apache.org.
Comment empty block.

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

Branch: refs/heads/release
Commit: 437d4d653a1eb5e4a7261998f1bbd0bbc558a6fa
Parents: f433a99
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:46:15 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:46:15 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java  | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/437d4d65/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
index 79fbd73..00a6992 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
@@ -273,6 +273,7 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
                 try {
                     connection.setAutoCommit(originalAutoCommit);
                 } catch (final SQLException e) {
+                    // Ignore.
                 }
                 this.currentXid = null;
             }


[45/50] [abbrv] commons-dbcp git commit: Format tweak.

Posted by gg...@apache.org.
Format tweak.

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

Branch: refs/heads/release
Commit: 518adf6593ccd239f508254938824b93e95bc663
Parents: e183847
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Jun 12 09:22:16 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Jun 12 09:22:16 2018 -0600

----------------------------------------------------------------------
 src/changes/release-notes.vm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/518adf65/src/changes/release-notes.vm
----------------------------------------------------------------------
diff --git a/src/changes/release-notes.vm b/src/changes/release-notes.vm
index 6a5a727..7b784c6 100644
--- a/src/changes/release-notes.vm
+++ b/src/changes/release-notes.vm
@@ -15,7 +15,7 @@
 ## specific language governing permissions and limitations
 ## under the License.
               Apache ${project.name}
-                  Version ${version}
+                 Version ${version}
                  RELEASE NOTES
 
 The ${developmentTeam} is pleased to announce the release of Apache ${project.name} ${version}.


[37/50] [abbrv] commons-dbcp git commit: Line length 120.

Posted by gg...@apache.org.
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
index 1442536..098950d 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
@@ -26,15 +26,11 @@ import java.util.List;
 /**
  * A base delegating implementation of {@link Statement}.
  * <p>
- * All of the methods from the {@link Statement} interface
- * simply check to see that the {@link Statement} is active,
- * and call the corresponding method on the "delegate"
- * provided in my constructor.
+ * All of the methods from the {@link Statement} interface simply check to see that the {@link Statement} is active, and
+ * call the corresponding method on the "delegate" provided in my constructor.
  * <p>
- * Extends AbandonedTrace to implement Statement tracking and
- * logging of code which created the Statement. Tracking the
- * Statement ensures that the Connection which created it can
- * close any open Statement's on Connection close.
+ * Extends AbandonedTrace to implement Statement tracking and logging of code which created the Statement. Tracking the
+ * Statement ensures that the Connection which created it can close any open Statement's on Connection close.
  *
  * @since 2.0
  */
@@ -71,7 +67,6 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
         return statement;
     }
 
-
     /**
      * If my underlying {@link Statement} is not a {@code DelegatingStatement}, returns it, otherwise recursively
      * invokes this method on my delegate.
@@ -83,6 +78,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
      * This method is useful when you may have nested {@code DelegatingStatement}s, and you want to make sure to obtain
      * a "genuine" {@link Statement}.
      * </p>
+     * 
      * @return The innermost delegate.
      *
      * @see #getDelegate
@@ -101,7 +97,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
     /**
      * Sets my delegate.
      *
-     * @param statement my delegate.
+     * @param statement
+     *            my delegate.
      */
     public void setDelegate(final Statement statement) {
         this.statement = statement;
@@ -118,10 +115,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
     }
 
     protected void checkOpen() throws SQLException {
-        if(isClosed()) {
-            throw new SQLException
-                (this.getClass().getName() + " with address: \"" +
-                this.toString() + "\" is closed.");
+        if (isClosed()) {
+            throw new SQLException(this.getClass().getName() + " with address: \"" + this.toString() + "\" is closed.");
         }
     }
 
@@ -168,8 +163,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
     protected void handleException(final SQLException e) throws SQLException {
         if (connection != null) {
             connection.handleException(e);
-        }
-        else {
+        } else {
             throw e;
         }
     }
@@ -215,9 +209,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
             connection.setLastUsed();
         }
         try {
-            return DelegatingResultSet.wrapResultSet(this,statement.executeQuery(sql));
-        }
-        catch (final SQLException e) {
+            return DelegatingResultSet.wrapResultSet(this, statement.executeQuery(sql));
+        } catch (final SQLException e) {
             handleException(e);
             throw new AssertionError();
         }
@@ -227,9 +220,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
     public ResultSet getResultSet() throws SQLException {
         checkOpen();
         try {
-            return DelegatingResultSet.wrapResultSet(this,statement.getResultSet());
-        }
-        catch (final SQLException e) {
+            return DelegatingResultSet.wrapResultSet(this, statement.getResultSet());
+        } catch (final SQLException e) {
             handleException(e);
             throw new AssertionError();
         }
@@ -244,7 +236,8 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
         try {
             return statement.executeUpdate(sql);
         } catch (final SQLException e) {
-            handleException(e); return 0;
+            handleException(e);
+            return 0;
         }
     }
 
@@ -631,7 +624,6 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
         return closed;
     }
 
-
     @Override
     public boolean isWrapperFor(final Class<?> iface) throws SQLException {
         if (iface.isAssignableFrom(getClass())) {
@@ -659,8 +651,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
         checkOpen();
         try {
             statement.setPoolable(poolable);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -670,8 +661,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
         checkOpen();
         try {
             return statement.isPoolable();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return false;
         }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
index f9b1561..7c62ed5 100644
--- a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
@@ -16,6 +16,7 @@
  */
 
 package org.apache.commons.dbcp2;
+
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.SQLException;
@@ -37,11 +38,11 @@ public class DriverManagerConnectionFactory implements ConnectionFactory {
         DriverManager.getDrivers();
     }
 
-
     /**
      * Constructor for DriverManagerConnectionFactory.
-     * @param connectionUri a database url of the form
-     * <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
+     * 
+     * @param connectionUri
+     *            a database url of the form <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
      * @since 2.2
      */
     public DriverManagerConnectionFactory(final String connectionUri) {
@@ -51,11 +52,12 @@ public class DriverManagerConnectionFactory implements ConnectionFactory {
 
     /**
      * Constructor for DriverManagerConnectionFactory.
-     * @param connectionUri a database url of the form
-     * <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
-     * @param properties a list of arbitrary string tag/value pairs as
-     * connection arguments; normally at least a "user" and "password"
-     * property should be included.
+     * 
+     * @param connectionUri
+     *            a database url of the form <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
+     * @param properties
+     *            a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and
+     *            "password" property should be included.
      */
     public DriverManagerConnectionFactory(final String connectionUri, final Properties properties) {
         this.connectionUri = connectionUri;
@@ -64,12 +66,16 @@ public class DriverManagerConnectionFactory implements ConnectionFactory {
 
     /**
      * Constructor for DriverManagerConnectionFactory.
-     * @param connectionUri a database url of the form
-     * <code>jdbc:<em>subprotocol</em>:<em>subname</em></code>
-     * @param userName the database user
-     * @param userPassword the user's password
+     * 
+     * @param connectionUri
+     *            a database url of the form <code>jdbc:<em>subprotocol</em>:<em>subname</em></code>
+     * @param userName
+     *            the database user
+     * @param userPassword
+     *            the user's password
      */
-    public DriverManagerConnectionFactory(final String connectionUri, final String userName, final String userPassword) {
+    public DriverManagerConnectionFactory(final String connectionUri, final String userName,
+            final String userPassword) {
         this.connectionUri = connectionUri;
         this.userName = userName;
         this.userPassword = userPassword;

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java b/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java
index 3e60818..3c69a54 100644
--- a/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java
+++ b/src/main/java/org/apache/commons/dbcp2/LifetimeExceededException.java
@@ -21,7 +21,7 @@ package org.apache.commons.dbcp2;
  *
  * @since 2.1
  */
- class LifetimeExceededException extends Exception {
+class LifetimeExceededException extends Exception {
 
     private static final long serialVersionUID = -3783783104516492659L;
 
@@ -35,7 +35,8 @@ package org.apache.commons.dbcp2;
     /**
      * Create a LifetimeExceededException with the given message.
      *
-     * @param message The message with which to create the exception
+     * @param message
+     *            The message with which to create the exception
      */
     public LifetimeExceededException(final String message) {
         super(message);

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
index b9dccad..969a7e1 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
@@ -26,8 +26,8 @@ import java.util.List;
 import org.apache.commons.pool2.KeyedObjectPool;
 
 /**
- * A {@link DelegatingCallableStatement} that cooperates with
- * {@link PoolingConnection} to implement a pool of {@link CallableStatement}s.
+ * A {@link DelegatingCallableStatement} that cooperates with {@link PoolingConnection} to implement a pool of
+ * {@link CallableStatement}s.
  * <p>
  * The {@link #close} method returns this statement to its containing pool. (See {@link PoolingConnection}.)
  *
@@ -49,10 +49,14 @@ public class PoolableCallableStatement extends DelegatingCallableStatement {
     /**
      * Constructor.
      *
-     * @param callableStatement the underlying {@link CallableStatement}
-     * @param key the key for this statement in the {@link KeyedObjectPool}
-     * @param pool the {@link KeyedObjectPool} from which this CallableStatement was obtained
-     * @param connection the {@link DelegatingConnection} that created this CallableStatement
+     * @param callableStatement
+     *            the underlying {@link CallableStatement}
+     * @param key
+     *            the key for this statement in the {@link KeyedObjectPool}
+     * @param pool
+     *            the {@link KeyedObjectPool} from which this CallableStatement was obtained
+     * @param connection
+     *            the {@link DelegatingConnection} that created this CallableStatement
      */
     public PoolableCallableStatement(final CallableStatement callableStatement, final PStmtKey key,
             final KeyedObjectPool<PStmtKey, DelegatingPreparedStatement> pool,
@@ -69,7 +73,7 @@ public class PoolableCallableStatement extends DelegatingCallableStatement {
     }
 
     /**
-     * Returns the CallableStatement to the pool.  If {{@link #isClosed()}, this is a No-op.
+     * Returns the CallableStatement to the pool. If {{@link #isClosed()}, this is a No-op.
      */
     @Override
     public void close() throws SQLException {
@@ -88,8 +92,8 @@ public class PoolableCallableStatement extends DelegatingCallableStatement {
     }
 
     /**
-     * Activates after retrieval from the pool. Adds a trace for this CallableStatement to the Connection
-     * that created it.
+     * Activates after retrieval from the pool. Adds a trace for this CallableStatement to the Connection that created
+     * it.
      *
      * @since 2.4.0 made public, was protected in 2.3.0.
      */
@@ -103,8 +107,8 @@ public class PoolableCallableStatement extends DelegatingCallableStatement {
     }
 
     /**
-     * Passivates to prepare for return to the pool.  Removes the trace associated with this CallableStatement
-     * from the Connection that created it.  Also closes any associated ResultSets.
+     * Passivates to prepare for return to the pool. Removes the trace associated with this CallableStatement from the
+     * Connection that created it. Also closes any associated ResultSets.
      *
      * @since 2.4.0 made public, was protected in 2.3.0.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
index a948d78..5d3c396 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
@@ -53,8 +53,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
      * @param dataSourceJmxObjectName
      *            The JMX object name, may be null.
      */
-    public PoolableConnectionFactory(final ConnectionFactory connFactory,
-            final ObjectName dataSourceJmxObjectName) {
+    public PoolableConnectionFactory(final ConnectionFactory connFactory, final ObjectName dataSourceJmxObjectName) {
         this.connectionFactory = connFactory;
         this.dataSourceJmxObjectName = dataSourceJmxObjectName;
     }
@@ -199,7 +198,6 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
         this.maxConnLifetimeMillis = maxConnLifetimeMillis;
     }
 
-
     public boolean isEnableAutoCommitOnReturn() {
         return enableAutoCommitOnReturn;
     }
@@ -208,7 +206,6 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
         this.enableAutoCommitOnReturn = enableAutoCommitOnReturn;
     }
 
-
     public boolean isRollbackOnReturn() {
         return rollbackOnReturn;
     }
@@ -326,7 +323,8 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
         if (dataSourceJmxObjectName == null) {
             connJmxName = null;
         } else {
-            connJmxName = new ObjectName(dataSourceJmxObjectName.toString() + Constants.JMX_CONNECTION_BASE_EXT + connIndex);
+            connJmxName = new ObjectName(
+                    dataSourceJmxObjectName.toString() + Constants.JMX_CONNECTION_BASE_EXT + connIndex);
         }
 
         final PoolableConnection pc = new PoolableConnection(conn, pool, connJmxName, disconnectionSqlCodes,
@@ -352,8 +350,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
     }
 
     @Override
-    public void destroyObject(final PooledObject<PoolableConnection> p)
-            throws Exception {
+    public void destroyObject(final PooledObject<PoolableConnection> p) throws Exception {
         p.getObject().reallyClose();
     }
 
@@ -366,8 +363,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
             return true;
         } catch (final Exception e) {
             if (log.isDebugEnabled()) {
-                log.debug(Utils.getMessage(
-                        "poolableConnectionFactory.validateObject.fail"), e);
+                log.debug(Utils.getMessage("poolableConnectionFactory.validateObject.fail"), e);
             }
             return false;
         }
@@ -438,10 +434,8 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
         if (maxConnLifetimeMillis > 0) {
             final long lifetime = System.currentTimeMillis() - p.getCreateTime();
             if (lifetime > maxConnLifetimeMillis) {
-                throw new LifetimeExceededException(Utils.getMessage(
-                        "connectionFactory.lifetimeExceeded",
-                        Long.valueOf(lifetime),
-                        Long.valueOf(maxConnLifetimeMillis)));
+                throw new LifetimeExceededException(Utils.getMessage("connectionFactory.lifetimeExceeded",
+                        Long.valueOf(lifetime), Long.valueOf(maxConnLifetimeMillis)));
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
index fa3e95a..1601ab4 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
@@ -19,41 +19,52 @@ package org.apache.commons.dbcp2;
 import java.sql.SQLException;
 
 /**
- * Defines the attributes and methods that will be exposed via JMX for
- * {@link PoolableConnection} instances.
+ * Defines the attributes and methods that will be exposed via JMX for {@link PoolableConnection} instances.
+ * 
  * @since 2.0
  */
 public interface PoolableConnectionMXBean {
     // Read-only properties
     boolean isClosed() throws SQLException;
-    //SQLWarning getWarnings() throws SQLException;
+
+    // SQLWarning getWarnings() throws SQLException;
     String getToString();
 
     // Read-write properties
     boolean getAutoCommit() throws SQLException;
+
     void setAutoCommit(boolean autoCommit) throws SQLException;
 
     boolean getCacheState();
+
     void setCacheState(boolean cacheState);
 
     String getCatalog() throws SQLException;
+
     void setCatalog(String catalog) throws SQLException;
 
     int getHoldability() throws SQLException;
+
     void setHoldability(int holdability) throws SQLException;
 
     boolean isReadOnly() throws SQLException;
+
     void setReadOnly(boolean readOnly) throws SQLException;
 
     String getSchema() throws SQLException;
+
     void setSchema(String schema) throws SQLException;
 
     int getTransactionIsolation() throws SQLException;
+
     void setTransactionIsolation(int level) throws SQLException;
 
     // Methods
     void clearCachedState();
+
     void clearWarnings() throws SQLException;
+
     void close() throws SQLException;
+
     void reallyClose() throws SQLException;
 }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
index 94bc92c..21676b6 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
@@ -25,12 +25,13 @@ import java.util.List;
 import org.apache.commons.pool2.KeyedObjectPool;
 
 /**
- * A {@link DelegatingPreparedStatement} that cooperates with
- * {@link PoolingConnection} to implement a pool of {@link PreparedStatement}s.
+ * A {@link DelegatingPreparedStatement} that cooperates with {@link PoolingConnection} to implement a pool of
+ * {@link PreparedStatement}s.
  * <p>
  * My {@link #close} method returns me to my containing pool. (See {@link PoolingConnection}.)
  *
- * @param <K> the key type
+ * @param <K>
+ *            the key type
  *
  * @see PoolingConnection
  * @since 2.0
@@ -50,21 +51,25 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
 
     /**
      * Constructor
-     * @param stmt my underlying {@link PreparedStatement}
-     * @param key my key" as used by {@link KeyedObjectPool}
-     * @param pool the {@link KeyedObjectPool} from which I was obtained.
-     * @param conn the {@link java.sql.Connection Connection} from which I was created
+     * 
+     * @param stmt
+     *            my underlying {@link PreparedStatement}
+     * @param key
+     *            my key" as used by {@link KeyedObjectPool}
+     * @param pool
+     *            the {@link KeyedObjectPool} from which I was obtained.
+     * @param conn
+     *            the {@link java.sql.Connection Connection} from which I was created
      */
     public PoolablePreparedStatement(final PreparedStatement stmt, final K key,
-            final KeyedObjectPool<K, PoolablePreparedStatement<K>> pool,
-            final DelegatingConnection<?> conn) {
+            final KeyedObjectPool<K, PoolablePreparedStatement<K>> pool, final DelegatingConnection<?> conn) {
         super(conn, stmt);
         this.pool = pool;
         this.key = key;
 
         // Remove from trace now because this statement will be
         // added by the activate method.
-        if(getConnectionInternal() != null) {
+        if (getConnectionInternal() != null) {
             getConnectionInternal().removeTrace(this);
         }
     }
@@ -96,20 +101,20 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
         if (!isClosed()) {
             try {
                 pool.returnObject(key, this);
-            } catch(final SQLException e) {
+            } catch (final SQLException e) {
                 throw e;
-            } catch(final RuntimeException e) {
+            } catch (final RuntimeException e) {
                 throw e;
-            } catch(final Exception e) {
+            } catch (final Exception e) {
                 throw new SQLException("Cannot close preparedstatement (return to pool failed)", e);
             }
         }
     }
 
     @Override
-    public void activate() throws SQLException{
+    public void activate() throws SQLException {
         setClosedInternal(false);
-        if(getConnectionInternal() != null) {
+        if (getConnectionInternal() != null) {
             getConnectionInternal().addTrace(this);
         }
         super.activate();
@@ -123,7 +128,7 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
             clearBatch();
         }
         setClosedInternal(true);
-        if(getConnectionInternal() != null) {
+        if (getConnectionInternal() != null) {
             getConnectionInternal().removeTrace(this);
         }
 
@@ -132,7 +137,7 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
         // FIXME The PreparedStatement we're wrapping should handle this for us.
         // See bug 17301 for what could happen when ResultSets are closed twice.
         final List<AbandonedTrace> resultSets = getTrace();
-        if( resultSets != null) {
+        if (resultSets != null) {
             final ResultSet[] set = resultSets.toArray(new ResultSet[resultSets.size()]);
             for (final ResultSet element : set) {
                 element.close();

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
index d28f7a4..114b704 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
@@ -55,9 +55,10 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
     public PoolingDataSource(final ObjectPool<C> pool) {
         Objects.requireNonNull(pool, "Pool must not be null.");
         this.pool = pool;
-        // Verify that pool's factory refers back to it.  If not, log a warning and try to fix.
+        // Verify that pool's factory refers back to it. If not, log a warning and try to fix.
         if (this.pool instanceof GenericObjectPool<?>) {
-            final PoolableConnectionFactory pcf = (PoolableConnectionFactory) ((GenericObjectPool<?>) this.pool).getFactory();
+            final PoolableConnectionFactory pcf = (PoolableConnectionFactory) ((GenericObjectPool<?>) this.pool)
+                    .getFactory();
             Objects.requireNonNull(pcf, "PoolableConnectionFactory must not be null.");
             if (pcf.getPool() != this.pool) {
                 log.warn(Utils.getMessage("poolingDataSource.factoryConfig"));
@@ -77,9 +78,9 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
     public void close() throws Exception {
         try {
             pool.close();
-        } catch(final RuntimeException rte) {
+        } catch (final RuntimeException rte) {
             throw new RuntimeException(Utils.getMessage("pool.close.fail"), rte);
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             throw new SQLException(Utils.getMessage("pool.close.fail"), e);
         }
     }
@@ -121,7 +122,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
         throw new SQLFeatureNotSupportedException();
     }
 
-    //--- DataSource methods -----------------------------------------
+    // --- DataSource methods -----------------------------------------
 
     /**
      * Returns a {@link java.sql.Connection} from my pool, according to the contract specified by
@@ -135,17 +136,17 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
                 return null;
             }
             return new PoolGuardConnectionWrapper<>(conn);
-        } catch(final SQLException e) {
+        } catch (final SQLException e) {
             throw e;
-        } catch(final NoSuchElementException e) {
+        } catch (final NoSuchElementException e) {
             throw new SQLException("Cannot get a connection, pool error " + e.getMessage(), e);
-        } catch(final RuntimeException e) {
+        } catch (final RuntimeException e) {
             throw e;
-        } catch(final InterruptedException e) {
+        } catch (final InterruptedException e) {
             // Reset the interrupt status so it is visible to callers
             Thread.currentThread().interrupt();
             throw new SQLException("Cannot get a connection, general error", e);
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             throw new SQLException("Cannot get a connection, general error", e);
         }
     }
@@ -153,7 +154,8 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
     /**
      * Throws {@link UnsupportedOperationException}
      *
-     * @throws UnsupportedOperationException always thrown
+     * @throws UnsupportedOperationException
+     *             always thrown
      */
     @Override
     public Connection getConnection(final String uname, final String passwd) throws SQLException {
@@ -217,8 +219,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
      *
      * @since 2.0
      */
-    private class PoolGuardConnectionWrapper<D extends Connection>
-            extends DelegatingConnection<D> {
+    private class PoolGuardConnectionWrapper<D extends Connection> extends DelegatingConnection<D> {
 
         PoolGuardConnectionWrapper(final D delegate) {
             super(delegate);

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
index 87ff2ba..ab33596 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
@@ -30,11 +30,8 @@ import java.util.logging.Logger;
 
 import org.apache.commons.pool2.ObjectPool;
 
-
 /**
- * A {@link Driver} implementation that obtains
- * {@link Connection}s from a registered
- * {@link ObjectPool}.
+ * A {@link Driver} implementation that obtains {@link Connection}s from a registered {@link ObjectPool}.
  *
  * @since 2.0
  */
@@ -44,14 +41,13 @@ public class PoolingDriver implements Driver {
     static {
         try {
             DriverManager.registerDriver(new PoolingDriver());
-        } catch(final Exception e) {
+        } catch (final Exception e) {
             // ignore
         }
     }
 
     /** The map of registered pools. */
-    protected static final HashMap<String, ObjectPool<? extends Connection>> pools =
-            new HashMap<>();
+    protected static final HashMap<String, ObjectPool<? extends Connection>> pools = new HashMap<>();
 
     /** Controls access to the underlying connection */
     private final boolean accessToUnderlyingConnectionAllowed;
@@ -70,7 +66,6 @@ public class PoolingDriver implements Driver {
         this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed;
     }
 
-
     /**
      * Returns the value of the accessToUnderlyingConnectionAllowed property.
      *
@@ -89,8 +84,7 @@ public class PoolingDriver implements Driver {
      * @throws SQLException
      *             Thrown when the named pool is not registered.
      */
-    public synchronized ObjectPool<? extends Connection> getConnectionPool(final String name)
-            throws SQLException {
+    public synchronized ObjectPool<? extends Connection> getConnectionPool(final String name) throws SQLException {
         final ObjectPool<? extends Connection> pool = pools.get(name);
         if (null == pool) {
             throw new SQLException("Pool not registered: " + name);
@@ -106,8 +100,7 @@ public class PoolingDriver implements Driver {
      * @param pool
      *            The pool.
      */
-    public synchronized void registerPool(final String name,
-            final ObjectPool<? extends Connection> pool) {
+    public synchronized void registerPool(final String name, final ObjectPool<? extends Connection> pool) {
         pools.put(name, pool);
     }
 
@@ -126,8 +119,7 @@ public class PoolingDriver implements Driver {
             pools.remove(name);
             try {
                 pool.close();
-            }
-            catch (final Exception e) {
+            } catch (final Exception e) {
                 throw new SQLException("Error closing pool " + name, e);
             }
         }
@@ -138,7 +130,7 @@ public class PoolingDriver implements Driver {
      *
      * @return the pool names.
      */
-    public synchronized String[] getPoolNames(){
+    public synchronized String[] getPoolNames() {
         final Set<String> names = pools.keySet();
         return names.toArray(new String[names.size()]);
     }
@@ -150,9 +142,8 @@ public class PoolingDriver implements Driver {
 
     @Override
     public Connection connect(final String url, final Properties info) throws SQLException {
-        if(acceptsURL(url)) {
-            final ObjectPool<? extends Connection> pool =
-                getConnectionPool(url.substring(URL_PREFIX_LEN));
+        if (acceptsURL(url)) {
+            final ObjectPool<? extends Connection> pool = getConnectionPool(url.substring(URL_PREFIX_LEN));
 
             try {
                 final Connection conn = pool.borrowObject();
@@ -160,13 +151,13 @@ public class PoolingDriver implements Driver {
                     return null;
                 }
                 return new PoolGuardConnectionWrapper(pool, conn);
-            } catch(final SQLException e) {
+            } catch (final SQLException e) {
                 throw e;
-            } catch(final NoSuchElementException e) {
+            } catch (final NoSuchElementException e) {
                 throw new SQLException("Cannot get a connection, pool error: " + e.getMessage(), e);
-            } catch(final RuntimeException e) {
+            } catch (final RuntimeException e) {
                 throw e;
-            } catch(final Exception e) {
+            } catch (final Exception e) {
                 throw new SQLException("Cannot get a connection, general error: " + e.getMessage(), e);
             }
         }
@@ -181,25 +172,23 @@ public class PoolingDriver implements Driver {
     /**
      * Invalidates the given connection.
      *
-     * @param conn connection to invalidate
-     * @throws SQLException if the connection is not a
-     * <code>PoolGuardConnectionWrapper</code> or an error occurs invalidating
-     * the connection
+     * @param conn
+     *            connection to invalidate
+     * @throws SQLException
+     *             if the connection is not a <code>PoolGuardConnectionWrapper</code> or an error occurs invalidating
+     *             the connection
      */
     public void invalidateConnection(final Connection conn) throws SQLException {
         if (conn instanceof PoolGuardConnectionWrapper) { // normal case
             final PoolGuardConnectionWrapper pgconn = (PoolGuardConnectionWrapper) conn;
             @SuppressWarnings("unchecked")
-            final
-            ObjectPool<Connection> pool = (ObjectPool<Connection>) pgconn.pool;
+            final ObjectPool<Connection> pool = (ObjectPool<Connection>) pgconn.pool;
             try {
                 pool.invalidateObject(pgconn.getDelegateInternal());
-            }
-            catch (final Exception e) {
+            } catch (final Exception e) {
                 // Ignore.
             }
-        }
-        else {
+        } else {
             throw new SQLException("Invalid connection class");
         }
     }
@@ -233,16 +222,15 @@ public class PoolingDriver implements Driver {
     protected static final int MINOR_VERSION = 0;
 
     /**
-     * PoolGuardConnectionWrapper is a Connection wrapper that makes sure a
-     * closed connection cannot be used anymore.
+     * PoolGuardConnectionWrapper is a Connection wrapper that makes sure a closed connection cannot be used anymore.
+     * 
      * @since 2.0
      */
     private class PoolGuardConnectionWrapper extends DelegatingConnection<Connection> {
 
         private final ObjectPool<? extends Connection> pool;
 
-        PoolGuardConnectionWrapper(final ObjectPool<? extends Connection> pool,
-                final Connection delegate) {
+        PoolGuardConnectionWrapper(final ObjectPool<? extends Connection> pool, final Connection delegate) {
             super(delegate);
             this.pool = pool;
         }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java b/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
index 0c793d5..3319a92 100644
--- a/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
+++ b/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
@@ -21,29 +21,31 @@ import org.apache.commons.pool2.SwallowedExceptionListener;
 
 /**
  * Class for logging swallowed exceptions.
+ * 
  * @since 2.0
  */
-public class SwallowedExceptionLogger implements SwallowedExceptionListener{
+public class SwallowedExceptionLogger implements SwallowedExceptionListener {
 
     private final Log log;
     private final boolean logExpiredConnections;
 
     /**
-     * Create a SwallowedExceptionLogger with the given logger.  By default,
-     * expired connection logging is turned on.
+     * Create a SwallowedExceptionLogger with the given logger. By default, expired connection logging is turned on.
      *
-     * @param log logger
+     * @param log
+     *            logger
      */
     public SwallowedExceptionLogger(final Log log) {
         this(log, true);
     }
 
     /**
-     * Create a SwallowedExceptionLogger with the given logger and expired
-     * connection logging property.
+     * Create a SwallowedExceptionLogger with the given logger and expired connection logging property.
      *
-     * @param log logger
-     * @param logExpiredConnections false suppresses logging of expired connection events
+     * @param log
+     *            logger
+     * @param logExpiredConnections
+     *            false suppresses logging of expired connection events
      */
     public SwallowedExceptionLogger(final Log log, final boolean logExpiredConnections) {
         this.log = log;
@@ -53,8 +55,7 @@ public class SwallowedExceptionLogger implements SwallowedExceptionListener{
     @Override
     public void onSwallowException(final Exception e) {
         if (logExpiredConnections || !(e instanceof LifetimeExceededException)) {
-            log.warn(Utils.getMessage(
-                    "swallowedExceptionLogger.onSwallowedException"), e);
+            log.warn(Utils.getMessage("swallowedExceptionLogger.onSwallowedException"), e);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/package-info.java b/src/main/java/org/apache/commons/dbcp2/package-info.java
index ecc2489..eddaf06 100644
--- a/src/main/java/org/apache/commons/dbcp2/package-info.java
+++ b/src/main/java/org/apache/commons/dbcp2/package-info.java
@@ -17,115 +17,116 @@
 
 /**
  * <p>
- *    Database Connection Pool API.
+ * Database Connection Pool API.
  * </p>
  *
  * <b>Overview in Dialog Form</b>
  * <p>
- *    Q: How do I use the DBCP package?
- * </p><p>
- *    A: There are two primary ways to access the DBCP pool, as a
- *    {@link java.sql.Driver Driver}, or as a {@link javax.sql.DataSource DataSource}.
- *    You'll want to create an instance of {@link org.apache.commons.dbcp2.PoolingDriver} or
- *    {@link org.apache.commons.dbcp2.PoolingDataSource}.  When using one of these
- *    interfaces, you can just use your JDBC objects the way you normally would.
- *    Closing a {@link java.sql.Connection} will simply return it to its pool.
- * </p>
- * <p>
- *    Q: But {@link org.apache.commons.dbcp2.PoolingDriver PoolingDriver} and
- *    {@link org.apache.commons.dbcp2.PoolingDataSource PoolingDataSource} both expect an
- *    {@link org.apache.commons.pool2.ObjectPool ObjectPool} as an input.  Where do I
- *    get one of those?
- * </p><p>
- *    A: The {@link org.apache.commons.pool2.ObjectPool ObjectPool} interface is defined
- *    in Commons Pool. You can use one of the provided implementations such as
- *    {@link org.apache.commons.pool2.impl.GenericObjectPool GenericObjectPool},
- *    {@link org.apache.commons.pool2.proxy.ProxiedObjectPool ProxiedObjectPool} or
- *    {@link org.apache.commons.pool2.impl.SoftReferenceObjectPool SoftReferenceObjectPool}
- *    or you can create your own.
- * </p>
- * <p>
- *    Q: Ok, I've found an {@link org.apache.commons.pool2.ObjectPool ObjectPool}
- *    implementation that I think suits my connection pooling needs.  But it wants
- *    a {@link org.apache.commons.pool2.PooledObjectFactory PooledObjectFactory}.
- *    What should I use for that?
- * </p><p>
- *    A: The DBCP package provides a class for this purpose. It's called
- *    {@link org.apache.commons.dbcp2.PoolableConnectionFactory}.
- *    It implements the factory and lifecycle methods of
- *    {@link org.apache.commons.pool2.PooledObjectFactory}
- *    for {@link java.sql.Connection}s.  But it doesn't create the actual database
- *    {@link java.sql.Connection}s itself, it uses a
- *    {@link org.apache.commons.dbcp2.ConnectionFactory} for that.
- *    The {@link org.apache.commons.dbcp2.PoolableConnectionFactory} will take
- *    {@link java.sql.Connection}s created by the {@link org.apache.commons.dbcp2.ConnectionFactory}
- *    and wrap them with classes that implement the pooling behaviour.
- * </p><p>
- *    Several implementations of {@link org.apache.commons.dbcp2.ConnectionFactory} are
- *    provided--one that uses {@link java.sql.DriverManager} to create connections
- *    ({@link org.apache.commons.dbcp2.DriverManagerConnectionFactory}),
- *    one that uses a {@link java.sql.Driver} to create connections
- *    ({@link org.apache.commons.dbcp2.DriverConnectionFactory}),
- *    one that uses a {@link javax.sql.DataSource} to create connections
- *    ({@link org.apache.commons.dbcp2.DataSourceConnectionFactory}).
- * </p>
- * <p>
- *    Q: I think I'm starting to get it, but can you walk me though it again?
- * </p><p>
- *    A: Sure.  Let's assume you want to create a {@link javax.sql.DataSource}
- *    that pools {@link java.sql.Connection}s.  Let's also assume that
- *    those pooled {@link java.sql.Connection}s should be obtained from
- *    the {@link java.sql.DriverManager}.
- *    You'll want to create a {@link org.apache.commons.dbcp2.PoolingDataSource}.
- * </p><p>
- *    The {@link org.apache.commons.dbcp2.PoolingDataSource} uses an underlying
- *    {@link org.apache.commons.pool2.ObjectPool} to create and store its
- *    {@link java.sql.Connection}.
- * </p><p>
- *    To create a {@link org.apache.commons.pool2.ObjectPool}, you'll need
- *    a {@link org.apache.commons.pool2.PooledObjectFactory} that creates
- *    the actual {@link java.sql.Connection}s.  That's what
- *    {@link org.apache.commons.dbcp2.PoolableConnectionFactory} is for.
- * </p><p>
- *    To create the {@link org.apache.commons.dbcp2.PoolableConnectionFactory},
- *    you'll need at least two things:</p>
- *    <ol>
- *     <li>
- * A {@link org.apache.commons.dbcp2.ConnectionFactory} from which
- * the actual database {@link java.sql.Connection}s will be obtained.
- *     </li>
- *     <li>
- * An empty and factory-less {@link org.apache.commons.pool2.ObjectPool}
- * in which the {@link java.sql.Connection}s will be stored.
- * <br>
+ * Q: How do I use the DBCP package?
+ * </p>
+ * <p>
+ * A: There are two primary ways to access the DBCP pool, as a {@link java.sql.Driver Driver}, or as a
+ * {@link javax.sql.DataSource DataSource}. You'll want to create an instance of
+ * {@link org.apache.commons.dbcp2.PoolingDriver} or {@link org.apache.commons.dbcp2.PoolingDataSource}. When using one
+ * of these interfaces, you can just use your JDBC objects the way you normally would. Closing a
+ * {@link java.sql.Connection} will simply return it to its pool.
+ * </p>
+ * <p>
+ * Q: But {@link org.apache.commons.dbcp2.PoolingDriver PoolingDriver} and
+ * {@link org.apache.commons.dbcp2.PoolingDataSource PoolingDataSource} both expect an
+ * {@link org.apache.commons.pool2.ObjectPool ObjectPool} as an input. Where do I get one of those?
+ * </p>
+ * <p>
+ * A: The {@link org.apache.commons.pool2.ObjectPool ObjectPool} interface is defined in Commons Pool. You can use one
+ * of the provided implementations such as {@link org.apache.commons.pool2.impl.GenericObjectPool GenericObjectPool},
+ * {@link org.apache.commons.pool2.proxy.ProxiedObjectPool ProxiedObjectPool} or
+ * {@link org.apache.commons.pool2.impl.SoftReferenceObjectPool SoftReferenceObjectPool} or you can create your own.
+ * </p>
+ * <p>
+ * Q: Ok, I've found an {@link org.apache.commons.pool2.ObjectPool ObjectPool} implementation that I think suits my
+ * connection pooling needs. But it wants a {@link org.apache.commons.pool2.PooledObjectFactory PooledObjectFactory}.
+ * What should I use for that?
+ * </p>
+ * <p>
+ * A: The DBCP package provides a class for this purpose. It's called
+ * {@link org.apache.commons.dbcp2.PoolableConnectionFactory}. It implements the factory and lifecycle methods of
+ * {@link org.apache.commons.pool2.PooledObjectFactory} for {@link java.sql.Connection}s. But it doesn't create the
+ * actual database {@link java.sql.Connection}s itself, it uses a {@link org.apache.commons.dbcp2.ConnectionFactory} for
+ * that. The {@link org.apache.commons.dbcp2.PoolableConnectionFactory} will take {@link java.sql.Connection}s created
+ * by the {@link org.apache.commons.dbcp2.ConnectionFactory} and wrap them with classes that implement the pooling
+ * behaviour.
+ * </p>
+ * <p>
+ * Several implementations of {@link org.apache.commons.dbcp2.ConnectionFactory} are provided--one that uses
+ * {@link java.sql.DriverManager} to create connections
+ * ({@link org.apache.commons.dbcp2.DriverManagerConnectionFactory}), one that uses a {@link java.sql.Driver} to create
+ * connections ({@link org.apache.commons.dbcp2.DriverConnectionFactory}), one that uses a {@link javax.sql.DataSource}
+ * to create connections ({@link org.apache.commons.dbcp2.DataSourceConnectionFactory}).
+ * </p>
+ * <p>
+ * Q: I think I'm starting to get it, but can you walk me though it again?
+ * </p>
+ * <p>
+ * A: Sure. Let's assume you want to create a {@link javax.sql.DataSource} that pools {@link java.sql.Connection}s.
+ * Let's also assume that those pooled {@link java.sql.Connection}s should be obtained from the
+ * {@link java.sql.DriverManager}. You'll want to create a {@link org.apache.commons.dbcp2.PoolingDataSource}.
+ * </p>
+ * <p>
+ * The {@link org.apache.commons.dbcp2.PoolingDataSource} uses an underlying {@link org.apache.commons.pool2.ObjectPool}
+ * to create and store its {@link java.sql.Connection}.
+ * </p>
+ * <p>
+ * To create a {@link org.apache.commons.pool2.ObjectPool}, you'll need a
+ * {@link org.apache.commons.pool2.PooledObjectFactory} that creates the actual {@link java.sql.Connection}s. That's
+ * what {@link org.apache.commons.dbcp2.PoolableConnectionFactory} is for.
+ * </p>
+ * <p>
+ * To create the {@link org.apache.commons.dbcp2.PoolableConnectionFactory}, you'll need at least two things:
+ * </p>
+ * <ol>
+ * <li>A {@link org.apache.commons.dbcp2.ConnectionFactory} from which the actual database {@link java.sql.Connection}s
+ * will be obtained.</li>
+ * <li>An empty and factory-less {@link org.apache.commons.pool2.ObjectPool} in which the {@link java.sql.Connection}s
+ * will be stored. <br>
  * When you pass an {@link org.apache.commons.pool2.ObjectPool} into the
- * {@link org.apache.commons.dbcp2.PoolableConnectionFactory}, it will
- * automatically register itself as the {@link org.apache.commons.pool2.PooledObjectFactory}
- * for that pool.
- *     </li>
- *    </ol>
- * <p>
- *    In code, that might look like this:
- * </p>
- * <pre>GenericObjectPool connectionPool = new GenericObjectPool(null);
- * ConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:some:connect:string", "userName", "password");
- * PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
- * PoolingDataSource dataSource = new PoolingDataSource(connectionPool);</pre>
- * <p>
- *    To create a {@link org.apache.commons.dbcp2.PoolingDriver}, we do the same thing,
- *    except that instead of creating a {@link javax.sql.DataSource} on the last line,
- *    we create a {@link org.apache.commons.dbcp2.PoolingDriver}, and register the
- *    {@code connectionPool} with it.  E.g.,:</p>
- * <pre>GenericObjectPool connectionPool = new GenericObjectPool(null);
- * ConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:some:connect:string", "userName", "password");
- * PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
+ * {@link org.apache.commons.dbcp2.PoolableConnectionFactory}, it will automatically register itself as the
+ * {@link org.apache.commons.pool2.PooledObjectFactory} for that pool.</li>
+ * </ol>
+ * <p>
+ * In code, that might look like this:
+ * </p>
+ * 
+ * <pre>
+ * GenericObjectPool connectionPool = new GenericObjectPool(null);
+ * ConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:some:connect:string", "userName",
+ *         "password");
+ * PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,
+ *         connectionPool, null, null, false, true);
+ * PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
+ * </pre>
+ * <p>
+ * To create a {@link org.apache.commons.dbcp2.PoolingDriver}, we do the same thing, except that instead of creating a
+ * {@link javax.sql.DataSource} on the last line, we create a {@link org.apache.commons.dbcp2.PoolingDriver}, and
+ * register the {@code connectionPool} with it. E.g.,:
+ * </p>
+ * 
+ * <pre>
+ * GenericObjectPool connectionPool = new GenericObjectPool(null);
+ * ConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:some:connect:string", "userName",
+ *         "password");
+ * PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,
+ *         connectionPool, null, null, false, true);
  * PoolingDriver driver = new PoolingDriver();
- * driver.registerPool("example",connectionPool);</pre>
+ * driver.registerPool("example", connectionPool);
+ * </pre>
  * <p>
- *    Since the {@link org.apache.commons.dbcp2.PoolingDriver} registers itself
- *    with the {@link java.sql.DriverManager} when it is created, now you can just
- *    go to the {@link java.sql.DriverManager} to create your {@link java.sql.Connection}s,
- *    like you normally would:</p>
- * <pre>Connection conn = DriverManager.getConnection("jdbc:apache:commons:dbcp:example");</pre>
+ * Since the {@link org.apache.commons.dbcp2.PoolingDriver} registers itself with the {@link java.sql.DriverManager}
+ * when it is created, now you can just go to the {@link java.sql.DriverManager} to create your
+ * {@link java.sql.Connection}s, like you normally would:
+ * </p>
+ * 
+ * <pre>
+ * Connection conn = DriverManager.getConnection("jdbc:apache:commons:dbcp:example");
+ * </pre>
  */
 package org.apache.commons.dbcp2;


[19/50] [abbrv] commons-dbcp git commit: Don't use deprecated ctor.

Posted by gg...@apache.org.
Don't use deprecated ctor.

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

Branch: refs/heads/release
Commit: 628e21fcc75ddf52ff2ad5c67ee7b4840b6357df
Parents: 95b6b99
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:57:40 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:57:40 2018 -0600

----------------------------------------------------------------------
 .../apache/commons/dbcp2/datasources/CPDSConnectionFactory.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/628e21fc/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
index 08f75e5..d6aa18a 100644
--- a/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/datasources/CPDSConnectionFactory.java
@@ -157,7 +157,7 @@ class CPDSConnectionFactory
             // should we add this object as a listener or the pool.
             // consider the validateObject method in decision
             pc.addConnectionEventListener(this);
-            pci = new PooledConnectionAndInfo(pc, userName, Utils.toString(userPassword));
+            pci = new PooledConnectionAndInfo(pc, userName, userPassword);
             pcMap.put(pc, pci);
         } catch (final SQLException e) {
             throw new RuntimeException(e.getMessage());


[05/50] [abbrv] commons-dbcp git commit: Add missing Javadoc HTML tags.

Posted by gg...@apache.org.
Add missing Javadoc HTML tags.

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

Branch: refs/heads/release
Commit: 15a5cf8860bf16f2b7cb00ac06f3b57618e8fcc0
Parents: c2999df
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:14:26 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:14:26 2018 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/15a5cf88/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index b41deea..6259bfc 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -48,6 +48,7 @@ import java.util.concurrent.Executor;
  * simply check to see that the {@link Connection} is active,
  * and call the corresponding method on the "delegate"
  * provided in my constructor.
+ * </p>
  * <p>
  * Extends AbandonedTrace to implement Connection tracking and
  * logging of code which created the Connection. Tracking the
@@ -55,6 +56,7 @@ import java.util.concurrent.Executor;
  * this connection and recycle it if its pool of connections
  * is nearing exhaustion and this connection's last usage is
  * older than the removeAbandonedTimeout.
+ * </p>
  *
  * @param <C> the Connection type
  *
@@ -77,7 +79,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     private Integer defaultQueryTimeoutSeconds;
 
     /**
-     * Create a wrapper for the Connection which traces this
+     * Creates a wrapper for the Connection which traces this
      * Connection in the AbandonedObjectPool.
      *
      * @param c the {@link Connection} to delegate all calls to.


[10/50] [abbrv] commons-dbcp git commit: Line length 120 and standard formatting.

Posted by gg...@apache.org.
Line length 120 and standard formatting.

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

Branch: refs/heads/release
Commit: cb48137d5ab27db5da09ee3940c2cf93fa47fcc6
Parents: cc7f070
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:42:43 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:42:43 2018 -0600

----------------------------------------------------------------------
 .../dbcp2/cpdsadapter/ConnectionImpl.java       | 77 ++++++++------------
 1 file changed, 31 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/cb48137d/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
index ec2155e..2226e8e 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/ConnectionImpl.java
@@ -35,6 +35,7 @@ import org.apache.commons.dbcp2.DelegatingPreparedStatement;
  * <p>
  * ConnectionImpl extends DelegatingConnection to enable access to the underlying connection.
  * </p>
+ *
  * @since 2.0
  */
 class ConnectionImpl extends DelegatingConnection<Connection> {
@@ -42,22 +43,23 @@ class ConnectionImpl extends DelegatingConnection<Connection> {
     private final boolean accessToUnderlyingConnectionAllowed;
 
     /** The object that instantiated this object */
-     private final PooledConnectionImpl pooledConnection;
+    private final PooledConnectionImpl pooledConnection;
 
     /**
      * Creates a <code>ConnectionImpl</code>.
      *
-     * @param pooledConnection The PooledConnection that is calling the ctor.
-     * @param connection The JDBC 1.x Connection to wrap.
-     * @param accessToUnderlyingConnectionAllowed if true, then access is allowed to the underlying connection
+     * @param pooledConnection
+     *            The PooledConnection that is calling the ctor.
+     * @param connection
+     *            The JDBC 1.x Connection to wrap.
+     * @param accessToUnderlyingConnectionAllowed
+     *            if true, then access is allowed to the underlying connection
      */
-    ConnectionImpl(final PooledConnectionImpl pooledConnection,
-            final Connection connection,
+    ConnectionImpl(final PooledConnectionImpl pooledConnection, final Connection connection,
             final boolean accessToUnderlyingConnectionAllowed) {
         super(connection);
         this.pooledConnection = pooledConnection;
-        this.accessToUnderlyingConnectionAllowed =
-            accessToUnderlyingConnectionAllowed;
+        this.accessToUnderlyingConnectionAllowed = accessToUnderlyingConnectionAllowed;
     }
 
     /**
@@ -126,7 +128,8 @@ class ConnectionImpl extends DelegatingConnection<Connection> {
      * @since 2.4.0
      */
     @Override
-    public CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency) throws SQLException {
+    public CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency)
+            throws SQLException {
         checkOpen();
         try {
             return new DelegatingCallableStatement(this,
@@ -187,10 +190,8 @@ class ConnectionImpl extends DelegatingConnection<Connection> {
     public PreparedStatement prepareStatement(final String sql) throws SQLException {
         checkOpen();
         try {
-            return new DelegatingPreparedStatement
-                (this, pooledConnection.prepareStatement(sql));
-        }
-        catch (final SQLException e) {
+            return new DelegatingPreparedStatement(this, pooledConnection.prepareStatement(sql));
+        } catch (final SQLException e) {
             handleException(e); // Does not return
             return null;
         }
@@ -204,75 +205,59 @@ class ConnectionImpl extends DelegatingConnection<Connection> {
      *             if this connection is closed or an error occurs in the wrapped connection.
      */
     @Override
-    public PreparedStatement prepareStatement(final String sql, final int resultSetType,
-                                              final int resultSetConcurrency)
+    public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency)
             throws SQLException {
         checkOpen();
         try {
-            return new DelegatingPreparedStatement
-                (this, pooledConnection.prepareStatement
-                    (sql,resultSetType,resultSetConcurrency));
-        }
-        catch (final SQLException e) {
+            return new DelegatingPreparedStatement(this,
+                    pooledConnection.prepareStatement(sql, resultSetType, resultSetConcurrency));
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public PreparedStatement prepareStatement(final String sql, final int resultSetType,
-                                              final int resultSetConcurrency,
-                                              final int resultSetHoldability)
-            throws SQLException {
+    public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency,
+            final int resultSetHoldability) throws SQLException {
         checkOpen();
         try {
             return new DelegatingPreparedStatement(this,
-                    pooledConnection.prepareStatement(sql, resultSetType,
-                            resultSetConcurrency, resultSetHoldability));
-        }
-        catch (final SQLException e) {
+                    pooledConnection.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability));
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys)
-            throws SQLException {
+    public PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys) throws SQLException {
         checkOpen();
         try {
-            return new DelegatingPreparedStatement(this,
-                    pooledConnection.prepareStatement(sql, autoGeneratedKeys));
-        }
-        catch (final SQLException e) {
+            return new DelegatingPreparedStatement(this, pooledConnection.prepareStatement(sql, autoGeneratedKeys));
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public PreparedStatement prepareStatement(final String sql, final int columnIndexes[])
-            throws SQLException {
+    public PreparedStatement prepareStatement(final String sql, final int columnIndexes[]) throws SQLException {
         checkOpen();
         try {
-            return new DelegatingPreparedStatement(this,
-                    pooledConnection.prepareStatement(sql, columnIndexes));
-        }
-        catch (final SQLException e) {
+            return new DelegatingPreparedStatement(this, pooledConnection.prepareStatement(sql, columnIndexes));
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public PreparedStatement prepareStatement(final String sql, final String columnNames[])
-            throws SQLException {
+    public PreparedStatement prepareStatement(final String sql, final String columnNames[]) throws SQLException {
         checkOpen();
         try {
-            return new DelegatingPreparedStatement(this,
-                    pooledConnection.prepareStatement(sql, columnNames));
-        }
-        catch (final SQLException e) {
+            return new DelegatingPreparedStatement(this, pooledConnection.prepareStatement(sql, columnNames));
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }


[40/50] [abbrv] commons-dbcp git commit: Line length 120.

Posted by gg...@apache.org.
Line length 120.

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

Branch: refs/heads/release
Commit: d5a24430061654ac5319ba1392415e7f3958a475
Parents: c43bd77
Author: Gary Gregory <ga...@gmail.com>
Authored: Tue Jun 12 08:14:16 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Tue Jun 12 08:14:16 2018 -0600

----------------------------------------------------------------------
 .../apache/commons/dbcp2/AbandonedTrace.java    |   10 +-
 .../apache/commons/dbcp2/BasicDataSource.java   |   53 +-
 .../commons/dbcp2/BasicDataSourceFactory.java   |  236 ++-
 .../apache/commons/dbcp2/ConnectionFactory.java |    6 +-
 .../commons/dbcp2/DelegatingConnection.java     |  319 ++--
 .../dbcp2/DelegatingDatabaseMetaData.java       | 1199 +++++++++----
 .../commons/dbcp2/DelegatingResultSet.java      | 1580 +++++++++++++-----
 .../commons/dbcp2/DelegatingStatement.java      |   46 +-
 .../dbcp2/DriverManagerConnectionFactory.java   |   32 +-
 .../dbcp2/LifetimeExceededException.java        |    5 +-
 .../dbcp2/PoolableCallableStatement.java        |   26 +-
 .../dbcp2/PoolableConnectionFactory.java        |   20 +-
 .../commons/dbcp2/PoolableConnectionMXBean.java |   17 +-
 .../dbcp2/PoolablePreparedStatement.java        |   39 +-
 .../apache/commons/dbcp2/PoolingDataSource.java |   27 +-
 .../org/apache/commons/dbcp2/PoolingDriver.java |   60 +-
 .../commons/dbcp2/SwallowedExceptionLogger.java |   21 +-
 .../org/apache/commons/dbcp2/package-info.java  |  207 +--
 18 files changed, 2530 insertions(+), 1373 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
index 77b5441..659fe76 100644
--- a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
+++ b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
@@ -50,7 +50,8 @@ public class AbandonedTrace implements TrackedUse {
     /**
      * Constructs a new AbandonedTrace with a parent object.
      *
-     * @param parent AbandonedTrace parent object.
+     * @param parent
+     *            AbandonedTrace parent object.
      */
     public AbandonedTrace(final AbandonedTrace parent) {
         init(parent);
@@ -59,7 +60,8 @@ public class AbandonedTrace implements TrackedUse {
     /**
      * Initializes abandoned tracing for this object.
      *
-     * @param parent AbandonedTrace parent object.
+     * @param parent
+     *            AbandonedTrace parent object.
      */
     private void init(final AbandonedTrace parent) {
         if (parent != null) {
@@ -111,7 +113,7 @@ public class AbandonedTrace implements TrackedUse {
      * Clears the list of objects being traced by this object.
      */
     protected void clearTrace() {
-        synchronized(this.traceList) {
+        synchronized (this.traceList) {
             this.traceList.clear();
         }
     }
@@ -149,7 +151,7 @@ public class AbandonedTrace implements TrackedUse {
      *            AbandonedTrace object to remove.
      */
     protected void removeTrace(final AbandonedTrace trace) {
-        synchronized(this.traceList) {
+        synchronized (this.traceList) {
             final Iterator<WeakReference<AbandonedTrace>> iter = traceList.iterator();
             while (iter.hasNext()) {
                 final AbandonedTrace traceInList = iter.next().get();

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
index 861238f..d940e7e 100644
--- a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java
@@ -129,7 +129,6 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
         this.defaultAutoCommit = defaultAutoCommit;
     }
 
-
     /**
      * The default read-only state of connections created by this pool.
      */
@@ -165,8 +164,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
     /**
      * The default TransactionIsolation state of connections created by this pool.
      */
-    private volatile int defaultTransactionIsolation =
-        PoolableConnectionFactory.UNKNOWN_TRANSACTIONISOLATION;
+    private volatile int defaultTransactionIsolation = PoolableConnectionFactory.UNKNOWN_TRANSACTIONISOLATION;
 
     /**
      * Returns the default transaction isolation state of returned connections.
@@ -197,7 +195,6 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
         this.defaultTransactionIsolation = defaultTransactionIsolation;
     }
 
-
     private Integer defaultQueryTimeoutSeconds;
 
     /**
@@ -210,7 +207,6 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
         return defaultQueryTimeoutSeconds;
     }
 
-
     /**
      * Sets the default query timeout that will be used for {@link java.sql.Statement Statement}s created from this
      * connection. <code>null</code> means that the driver default will be used.
@@ -222,7 +218,6 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
         this.defaultQueryTimeoutSeconds = defaultQueryTimeoutSeconds;
     }
 
-
     /**
      * The default "catalog" of connections created by this pool.
      */
@@ -254,8 +249,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
     public void setDefaultCatalog(final String defaultCatalog) {
         if (defaultCatalog != null && defaultCatalog.trim().length() > 0) {
             this.defaultCatalog = defaultCatalog;
-        }
-        else {
+        } else {
             this.defaultCatalog = null;
         }
     }
@@ -354,8 +348,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
     public synchronized void setDriverClassName(final String driverClassName) {
         if (driverClassName != null && driverClassName.trim().length() > 0) {
             this.driverClassName = driverClassName;
-        }
-        else {
+        } else {
             this.driverClassName = null;
         }
     }
@@ -535,10 +528,10 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
      * @see GenericObjectPool#setMinIdle(int)
      */
     public synchronized void setMinIdle(final int minIdle) {
-       this.minIdle = minIdle;
-       if (connectionPool != null) {
-           connectionPool.setMinIdle(minIdle);
-       }
+        this.minIdle = minIdle;
+        if (connectionPool != null) {
+            connectionPool.setMinIdle(minIdle);
+        }
     }
 
     /**
@@ -577,8 +570,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
      * The maximum number of milliseconds that the pool will wait (when there are no available connections) for a
      * connection to be returned before throwing an exception, or <= 0 to wait indefinitely.
      */
-    private long maxWaitMillis =
-            BaseObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS;
+    private long maxWaitMillis = BaseObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS;
 
     /**
      * Returns the maximum number of milliseconds that the pool will wait for a connection to be returned before
@@ -1541,7 +1533,8 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
      * @param pass
      *            The database user's password
      *
-     * @throws UnsupportedOperationException always thrown.
+     * @throws UnsupportedOperationException
+     *             always thrown.
      * @throws SQLException
      *             if a database access error occurs
      * @return nothing - always throws UnsupportedOperationException
@@ -1651,9 +1644,9 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
      * following conditions hold:
      * </p>
      * <ul>
-     *   <li>{@link #getRemoveAbandonedOnBorrow()}</li>
-     *   <li>{@link #getNumActive()} &gt; {@link #getMaxTotal()} - 3</li>
-     *   <li>{@link #getNumIdle()} &lt; 2</li>
+     * <li>{@link #getRemoveAbandonedOnBorrow()}</li>
+     * <li>{@link #getNumActive()} &gt; {@link #getMaxTotal()} - 3</li>
+     * <li>{@link #getNumIdle()} &lt; 2</li>
      * </ul>
      *
      * @see #getRemoveAbandonedTimeout()
@@ -1734,9 +1727,9 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
      * Abandoned connection cleanup happens when:
      * </p>
      * <ul>
-     *   <li>{@link #getRemoveAbandonedOnBorrow()} or {@link #getRemoveAbandonedOnMaintenance()} = true</li>
-     *   <li>{@link #getNumIdle() numIdle} &lt; 2</li>
-     *   <li>{@link #getNumActive() numActive} &gt; {@link #getMaxTotal() maxTotal} - 3</li>
+     * <li>{@link #getRemoveAbandonedOnBorrow()} or {@link #getRemoveAbandonedOnMaintenance()} = true</li>
+     * <li>{@link #getNumIdle() numIdle} &lt; 2</li>
+     * <li>{@link #getNumActive() numActive} &gt; {@link #getMaxTotal() maxTotal} - 3</li>
      * </ul>
      * <p>
      * The default value is 300 seconds.
@@ -2132,13 +2125,13 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean
     /**
      * Creates a JDBC connection factory for this datasource. The JDBC driver is loaded using the following algorithm:
      * <ol>
-     *   <li>If a Driver instance has been specified via {@link #setDriver(Driver)} use it</li>
-     *   <li>If no Driver instance was specified and {@link #driverClassName} is specified that class is loaded using the
-     *   {@link ClassLoader} of this class or, if {@link #driverClassLoader} is set, {@link #driverClassName} is loaded
-     *   with the specified {@link ClassLoader}.</li>
-     *   <li>If {@link #driverClassName} is specified and the previous attempt fails, the class is loaded using the
-     *   context class loader of the current thread.</li>
-     *   <li>If a driver still isn't loaded one is loaded via the {@link DriverManager} using the specified {@link #url}.
+     * <li>If a Driver instance has been specified via {@link #setDriver(Driver)} use it</li>
+     * <li>If no Driver instance was specified and {@link #driverClassName} is specified that class is loaded using the
+     * {@link ClassLoader} of this class or, if {@link #driverClassLoader} is set, {@link #driverClassName} is loaded
+     * with the specified {@link ClassLoader}.</li>
+     * <li>If {@link #driverClassName} is specified and the previous attempt fails, the class is loaded using the
+     * context class loader of the current thread.</li>
+     * <li>If a driver still isn't loaded one is loaded via the {@link DriverManager} using the specified {@link #url}.
      * </ol>
      * This method exists so subclasses can replace the implementation class.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
index dfd27e9..46af519 100644
--- a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
@@ -43,15 +43,14 @@ import org.apache.commons.pool2.impl.BaseObjectPoolConfig;
 import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
 
 /**
- * <p>JNDI object factory that creates an instance of
- * <code>BasicDataSource</code> that has been configured based on the
- * <code>RefAddr</code> values of the specified <code>Reference</code>, which
- * must match the names and data types of the <code>BasicDataSource</code> bean
- * properties with the following exceptions:</p>
+ * <p>
+ * JNDI object factory that creates an instance of <code>BasicDataSource</code> that has been configured based on the
+ * <code>RefAddr</code> values of the specified <code>Reference</code>, which must match the names and data types of the
+ * <code>BasicDataSource</code> bean properties with the following exceptions:
+ * </p>
  * <ul>
- * <li><code>connectionInitSqls</code> must be passed to this factory as a
- *     single String using semi-colon to delimit the statements whereas
- *     <code>BasicDataSource</code> requires a collection of Strings.</li>
+ * <li><code>connectionInitSqls</code> must be passed to this factory as a single String using semi-colon to delimit the
+ * statements whereas <code>BasicDataSource</code> requires a collection of Strings.</li>
  * </ul>
  *
  * @since 2.0
@@ -64,7 +63,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
     private static final String PROP_DEFAULTREADONLY = "defaultReadOnly";
     private static final String PROP_DEFAULTTRANSACTIONISOLATION = "defaultTransactionIsolation";
     private static final String PROP_DEFAULTCATALOG = "defaultCatalog";
-    private static final String PROP_CACHESTATE ="cacheState";
+    private static final String PROP_CACHESTATE = "cacheState";
     private static final String PROP_DRIVERCLASSNAME = "driverClassName";
     private static final String PROP_LIFO = "lifo";
     private static final String PROP_MAXTOTAL = "maxTotal";
@@ -89,8 +88,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
     private static final String PROP_JMX_NAME = "jmxName";
 
     /**
-     * The property name for connectionInitSqls.
-     * The associated value String must be of the form [query;]*
+     * The property name for connectionInitSqls. The associated value String must be of the form [query;]*
      */
     private static final String PROP_CONNECTIONINITSQLS = "connectionInitSqls";
     private static final String PROP_ACCESSTOUNDERLYINGCONNECTIONALLOWED = "accessToUnderlyingConnectionAllowed";
@@ -115,99 +113,58 @@ public class BasicDataSourceFactory implements ObjectFactory {
     private static final String PROP_DISCONNECTION_SQL_CODES = "disconnectionSqlCodes";
 
     /*
-     * Block with obsolete properties from DBCP 1.x.
-     * Warn users that these are ignored and they should use the 2.x properties.
+     * Block with obsolete properties from DBCP 1.x. Warn users that these are ignored and they should use the 2.x
+     * properties.
      */
     private static final String NUPROP_MAXACTIVE = "maxActive";
     private static final String NUPROP_REMOVEABANDONED = "removeAbandoned";
     private static final String NUPROP_MAXWAIT = "maxWait";
 
     /*
-     * Block with properties expected in a DataSource
-     * This props will not be listed as ignored - we know that they may appear in Resource,
-     * and not listing them as ignored.
+     * Block with properties expected in a DataSource This props will not be listed as ignored - we know that they may
+     * appear in Resource, and not listing them as ignored.
      */
     private static final String SILENTPROP_FACTORY = "factory";
     private static final String SILENTPROP_SCOPE = "scope";
     private static final String SILENTPROP_SINGLETON = "singleton";
     private static final String SILENTPROP_AUTH = "auth";
 
-    private static final String[] ALL_PROPERTIES = {
-        PROP_DEFAULTAUTOCOMMIT,
-        PROP_DEFAULTREADONLY,
-        PROP_DEFAULTTRANSACTIONISOLATION,
-        PROP_DEFAULTCATALOG,
-        PROP_CACHESTATE,
-        PROP_DRIVERCLASSNAME,
-        PROP_LIFO,
-        PROP_MAXTOTAL,
-        PROP_MAXIDLE,
-        PROP_MINIDLE,
-        PROP_INITIALSIZE,
-        PROP_MAXWAITMILLIS,
-        PROP_TESTONCREATE,
-        PROP_TESTONBORROW,
-        PROP_TESTONRETURN,
-        PROP_TIMEBETWEENEVICTIONRUNSMILLIS,
-        PROP_NUMTESTSPEREVICTIONRUN,
-        PROP_MINEVICTABLEIDLETIMEMILLIS,
-        PROP_SOFTMINEVICTABLEIDLETIMEMILLIS,
-        PROP_EVICTIONPOLICYCLASSNAME,
-        PROP_TESTWHILEIDLE,
-        PROP_PASSWORD,
-        PROP_URL,
-        PROP_USERNAME,
-        PROP_VALIDATIONQUERY,
-        PROP_VALIDATIONQUERY_TIMEOUT,
-        PROP_CONNECTIONINITSQLS,
-        PROP_ACCESSTOUNDERLYINGCONNECTIONALLOWED,
-        PROP_REMOVEABANDONEDONBORROW,
-        PROP_REMOVEABANDONEDONMAINTENANCE,
-        PROP_REMOVEABANDONEDTIMEOUT,
-        PROP_LOGABANDONED,
-        PROP_ABANDONEDUSAGETRACKING,
-        PROP_POOLPREPAREDSTATEMENTS,
-        PROP_MAXOPENPREPAREDSTATEMENTS,
-        PROP_CONNECTIONPROPERTIES,
-        PROP_MAXCONNLIFETIMEMILLIS,
-        PROP_LOGEXPIREDCONNECTIONS,
-        PROP_ROLLBACK_ON_RETURN,
-        PROP_ENABLE_AUTOCOMMIT_ON_RETURN,
-        PROP_DEFAULT_QUERYTIMEOUT,
-        PROP_FASTFAIL_VALIDATION,
-        PROP_DISCONNECTION_SQL_CODES,
-        PROP_JMX_NAME
-    };
+    private static final String[] ALL_PROPERTIES = {PROP_DEFAULTAUTOCOMMIT, PROP_DEFAULTREADONLY,
+            PROP_DEFAULTTRANSACTIONISOLATION, PROP_DEFAULTCATALOG, PROP_CACHESTATE, PROP_DRIVERCLASSNAME, PROP_LIFO,
+            PROP_MAXTOTAL, PROP_MAXIDLE, PROP_MINIDLE, PROP_INITIALSIZE, PROP_MAXWAITMILLIS, PROP_TESTONCREATE,
+            PROP_TESTONBORROW, PROP_TESTONRETURN, PROP_TIMEBETWEENEVICTIONRUNSMILLIS, PROP_NUMTESTSPEREVICTIONRUN,
+            PROP_MINEVICTABLEIDLETIMEMILLIS, PROP_SOFTMINEVICTABLEIDLETIMEMILLIS, PROP_EVICTIONPOLICYCLASSNAME,
+            PROP_TESTWHILEIDLE, PROP_PASSWORD, PROP_URL, PROP_USERNAME, PROP_VALIDATIONQUERY,
+            PROP_VALIDATIONQUERY_TIMEOUT, PROP_CONNECTIONINITSQLS, PROP_ACCESSTOUNDERLYINGCONNECTIONALLOWED,
+            PROP_REMOVEABANDONEDONBORROW, PROP_REMOVEABANDONEDONMAINTENANCE, PROP_REMOVEABANDONEDTIMEOUT,
+            PROP_LOGABANDONED, PROP_ABANDONEDUSAGETRACKING, PROP_POOLPREPAREDSTATEMENTS, PROP_MAXOPENPREPAREDSTATEMENTS,
+            PROP_CONNECTIONPROPERTIES, PROP_MAXCONNLIFETIMEMILLIS, PROP_LOGEXPIREDCONNECTIONS, PROP_ROLLBACK_ON_RETURN,
+            PROP_ENABLE_AUTOCOMMIT_ON_RETURN, PROP_DEFAULT_QUERYTIMEOUT, PROP_FASTFAIL_VALIDATION,
+            PROP_DISCONNECTION_SQL_CODES, PROP_JMX_NAME };
 
     /**
-     * Obsolete properties from DBCP 1.x. with warning strings suggesting
-     * new properties. LinkedHashMap will guarantee that properties will be listed
-     * to output in order of insertion into map.
+     * Obsolete properties from DBCP 1.x. with warning strings suggesting new properties. LinkedHashMap will guarantee
+     * that properties will be listed to output in order of insertion into map.
      */
     private static final Map<String, String> NUPROP_WARNTEXT = new LinkedHashMap<>();
 
     static {
-        NUPROP_WARNTEXT.put(
-                NUPROP_MAXACTIVE,
+        NUPROP_WARNTEXT.put(NUPROP_MAXACTIVE,
                 "Property " + NUPROP_MAXACTIVE + " is not used in DBCP2, use " + PROP_MAXTOTAL + " instead. "
-                        + PROP_MAXTOTAL + " default value is " + GenericObjectPoolConfig.DEFAULT_MAX_TOTAL+".");
-        NUPROP_WARNTEXT.put(
-                NUPROP_REMOVEABANDONED,
-                "Property " + NUPROP_REMOVEABANDONED + " is not used in DBCP2,"
-                        + " use one or both of "
+                        + PROP_MAXTOTAL + " default value is " + GenericObjectPoolConfig.DEFAULT_MAX_TOTAL + ".");
+        NUPROP_WARNTEXT.put(NUPROP_REMOVEABANDONED,
+                "Property " + NUPROP_REMOVEABANDONED + " is not used in DBCP2," + " use one or both of "
                         + PROP_REMOVEABANDONEDONBORROW + " or " + PROP_REMOVEABANDONEDONMAINTENANCE + " instead. "
                         + "Both have default value set to false.");
-        NUPROP_WARNTEXT.put(
-                NUPROP_MAXWAIT,
-                "Property " + NUPROP_MAXWAIT + " is not used in DBCP2"
-                        + " , use " + PROP_MAXWAITMILLIS + " instead. "
-                        + PROP_MAXWAITMILLIS + " default value is " + BaseObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS+".");
+        NUPROP_WARNTEXT.put(NUPROP_MAXWAIT,
+                "Property " + NUPROP_MAXWAIT + " is not used in DBCP2" + " , use " + PROP_MAXWAITMILLIS + " instead. "
+                        + PROP_MAXWAITMILLIS + " default value is " + BaseObjectPoolConfig.DEFAULT_MAX_WAIT_MILLIS
+                        + ".");
     }
 
     /**
-     * Silent Properties.
-     * These properties will not be listed as ignored - we know that they may appear in JDBC Resource references,
-     * and we will not list them as ignored.
+     * Silent Properties. These properties will not be listed as ignored - we know that they may appear in JDBC Resource
+     * references, and we will not list them as ignored.
      */
     private static final List<String> SILENT_PROPERTIES = new ArrayList<>();
 
@@ -222,23 +179,28 @@ public class BasicDataSourceFactory implements ObjectFactory {
     // -------------------------------------------------- ObjectFactory Methods
 
     /**
-     * <p>Create and return a new <code>BasicDataSource</code> instance.  If no
-     * instance can be created, return <code>null</code> instead.</p>
+     * <p>
+     * Create and return a new <code>BasicDataSource</code> instance. If no instance can be created, return
+     * <code>null</code> instead.
+     * </p>
      *
-     * @param obj The possibly null object containing location or
-     *  reference information that can be used in creating an object
-     * @param name The name of this object relative to <code>nameCtx</code>
-     * @param nameCtx The context relative to which the <code>name</code>
-     *  parameter is specified, or <code>null</code> if <code>name</code>
-     *  is relative to the default initial context
-     * @param environment The possibly null environment that is used in
-     *  creating this object
+     * @param obj
+     *            The possibly null object containing location or reference information that can be used in creating an
+     *            object
+     * @param name
+     *            The name of this object relative to <code>nameCtx</code>
+     * @param nameCtx
+     *            The context relative to which the <code>name</code> parameter is specified, or <code>null</code> if
+     *            <code>name</code> is relative to the default initial context
+     * @param environment
+     *            The possibly null environment that is used in creating this object
      *
-     * @throws Exception if an exception occurs creating the instance
+     * @throws Exception
+     *             if an exception occurs creating the instance
      */
     @Override
-    public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, final Hashtable<?,?> environment)
-        throws Exception {
+    public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx,
+            final Hashtable<?, ?> environment) throws Exception {
 
         // We only know how to deal with <code>javax.naming.Reference</code>s
         // that specify a class name of "javax.sql.DataSource"
@@ -274,29 +236,30 @@ public class BasicDataSourceFactory implements ObjectFactory {
     }
 
     /**
-     * Collects warnings and info messages.  Warnings are generated when an obsolete
-     * property is set.  Unknown properties generate info messages.
+     * Collects warnings and info messages. Warnings are generated when an obsolete property is set. Unknown properties
+     * generate info messages.
      *
-     * @param ref Reference to check properties of
-     * @param name Name provided to getObject
-     * @param warnings container for warning messages
-     * @param infoMessages container for info messages
+     * @param ref
+     *            Reference to check properties of
+     * @param name
+     *            Name provided to getObject
+     * @param warnings
+     *            container for warning messages
+     * @param infoMessages
+     *            container for info messages
      */
     private void validatePropertyNames(final Reference ref, final Name name, final List<String> warnings,
-                                      final List<String> infoMessages) {
+            final List<String> infoMessages) {
         final List<String> allPropsAsList = Arrays.asList(ALL_PROPERTIES);
         final String nameString = name != null ? "Name = " + name.toString() + " " : "";
-        if (NUPROP_WARNTEXT!=null && !NUPROP_WARNTEXT.keySet().isEmpty()) {
+        if (NUPROP_WARNTEXT != null && !NUPROP_WARNTEXT.keySet().isEmpty()) {
             for (final String propertyName : NUPROP_WARNTEXT.keySet()) {
                 final RefAddr ra = ref.get(propertyName);
                 if (ra != null && !allPropsAsList.contains(ra.getType())) {
                     final StringBuilder stringBuilder = new StringBuilder(nameString);
                     final String propertyValue = ra.getContent().toString();
-                    stringBuilder.append(NUPROP_WARNTEXT.get(propertyName))
-                            .append(" You have set value of \"")
-                            .append(propertyValue)
-                            .append("\" for \"")
-                            .append(propertyName)
+                    stringBuilder.append(NUPROP_WARNTEXT.get(propertyName)).append(" You have set value of \"")
+                            .append(propertyValue).append("\" for \"").append(propertyName)
                             .append("\" property, which is being ignored.");
                     warnings.add(stringBuilder.toString());
                 }
@@ -309,17 +272,12 @@ public class BasicDataSourceFactory implements ObjectFactory {
             final String propertyName = ra.getType();
             // If property name is not in the properties list, we haven't warned on it
             // and it is not in the "silent" list, tell user we are ignoring it.
-            if (!(allPropsAsList.contains(propertyName)
-                    || NUPROP_WARNTEXT.keySet().contains(propertyName)
+            if (!(allPropsAsList.contains(propertyName) || NUPROP_WARNTEXT.keySet().contains(propertyName)
                     || SILENT_PROPERTIES.contains(propertyName))) {
                 final String propertyValue = ra.getContent().toString();
                 final StringBuilder stringBuilder = new StringBuilder(nameString);
-                stringBuilder.append("Ignoring unknown property: ")
-                        .append("value of \"")
-                        .append(propertyValue)
-                        .append("\" for \"")
-                        .append(propertyName)
-                        .append("\" property");
+                stringBuilder.append("Ignoring unknown property: ").append("value of \"").append(propertyValue)
+                        .append("\" for \"").append(propertyName).append("\" property");
                 infoMessages.add(stringBuilder.toString());
             }
         }
@@ -353,20 +311,15 @@ public class BasicDataSourceFactory implements ObjectFactory {
             int level = PoolableConnectionFactory.UNKNOWN_TRANSACTIONISOLATION;
             if ("NONE".equalsIgnoreCase(value)) {
                 level = Connection.TRANSACTION_NONE;
-            }
-            else if ("READ_COMMITTED".equalsIgnoreCase(value)) {
+            } else if ("READ_COMMITTED".equalsIgnoreCase(value)) {
                 level = Connection.TRANSACTION_READ_COMMITTED;
-            }
-            else if ("READ_UNCOMMITTED".equalsIgnoreCase(value)) {
+            } else if ("READ_UNCOMMITTED".equalsIgnoreCase(value)) {
                 level = Connection.TRANSACTION_READ_UNCOMMITTED;
-            }
-            else if ("REPEATABLE_READ".equalsIgnoreCase(value)) {
+            } else if ("REPEATABLE_READ".equalsIgnoreCase(value)) {
                 level = Connection.TRANSACTION_REPEATABLE_READ;
-            }
-            else if ("SERIALIZABLE".equalsIgnoreCase(value)) {
+            } else if ("SERIALIZABLE".equalsIgnoreCase(value)) {
                 level = Connection.TRANSACTION_SERIALIZABLE;
-            }
-            else {
+            } else {
                 try {
                     level = Integer.parseInt(value);
                 } catch (final NumberFormatException e) {
@@ -541,12 +494,12 @@ public class BasicDataSourceFactory implements ObjectFactory {
 
         value = properties.getProperty(PROP_CONNECTIONPROPERTIES);
         if (value != null) {
-          final Properties p = getProperties(value);
-          final Enumeration<?> e = p.propertyNames();
-          while (e.hasMoreElements()) {
-            final String propertyName = (String) e.nextElement();
-            dataSource.addConnectionProperty(propertyName, p.getProperty(propertyName));
-          }
+            final Properties p = getProperties(value);
+            final Enumeration<?> e = p.propertyNames();
+            while (e.hasMoreElements()) {
+                final String propertyName = (String) e.nextElement();
+                dataSource.addConnectionProperty(propertyName, p.getProperty(propertyName));
+            }
         }
 
         value = properties.getProperty(PROP_MAXCONNLIFETIMEMILLIS);
@@ -600,24 +553,29 @@ public class BasicDataSourceFactory implements ObjectFactory {
     }
 
     /**
-     * <p>Parse properties from the string. Format of the string must be [propertyName=property;]*<p>
+     * <p>
+     * Parse properties from the string. Format of the string must be [propertyName=property;]*
+     * <p>
+     * 
      * @param propText
      * @return Properties
      * @throws Exception
      */
     private static Properties getProperties(final String propText) throws Exception {
-      final Properties p = new Properties();
-      if (propText != null) {
-        p.load(new ByteArrayInputStream(
-                propText.replace(';', '\n').getBytes(StandardCharsets.ISO_8859_1)));
-      }
-      return p;
+        final Properties p = new Properties();
+        if (propText != null) {
+            p.load(new ByteArrayInputStream(propText.replace(';', '\n').getBytes(StandardCharsets.ISO_8859_1)));
+        }
+        return p;
     }
 
     /**
      * Parse list of property values from a delimited string
-     * @param value delimited list of values
-     * @param delimiter character used to separate values in the list
+     * 
+     * @param value
+     *            delimited list of values
+     * @param delimiter
+     *            character used to separate values in the list
      * @return String Collection of values
      */
     private static Collection<String> parseList(final String value, final char delimiter) {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
index 38ea381..e49c654 100644
--- a/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/ConnectionFactory.java
@@ -26,11 +26,11 @@ import java.sql.SQLException;
  */
 public interface ConnectionFactory {
     /**
-     * Create a new {@link java.sql.Connection} in an
-     * implementation specific fashion.
+     * Create a new {@link java.sql.Connection} in an implementation specific fashion.
      *
      * @return a new {@link java.sql.Connection}
-     * @throws SQLException if a database error occurs creating the connection
+     * @throws SQLException
+     *             if a database error occurs creating the connection
      */
     Connection createConnection() throws SQLException;
 }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/d5a24430/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index 0fbc9ee..e4280b2 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -44,29 +44,24 @@ import java.util.concurrent.Executor;
 /**
  * A base delegating implementation of {@link Connection}.
  * <p>
- * All of the methods from the {@link Connection} interface
- * simply check to see that the {@link Connection} is active,
- * and call the corresponding method on the "delegate"
- * provided in my constructor.
+ * All of the methods from the {@link Connection} interface simply check to see that the {@link Connection} is active,
+ * and call the corresponding method on the "delegate" provided in my constructor.
  * </p>
  * <p>
- * Extends AbandonedTrace to implement Connection tracking and
- * logging of code which created the Connection. Tracking the
- * Connection ensures that the AbandonedObjectPool can close
- * this connection and recycle it if its pool of connections
- * is nearing exhaustion and this connection's last usage is
- * older than the removeAbandonedTimeout.
+ * Extends AbandonedTrace to implement Connection tracking and logging of code which created the Connection. Tracking
+ * the Connection ensures that the AbandonedObjectPool can close this connection and recycle it if its pool of
+ * connections is nearing exhaustion and this connection's last usage is older than the removeAbandonedTimeout.
  * </p>
  *
- * @param <C> the Connection type
+ * @param <C>
+ *            the Connection type
  *
  * @since 2.0
  */
-public class DelegatingConnection<C extends Connection> extends AbandonedTrace
-        implements Connection {
+public class DelegatingConnection<C extends Connection> extends AbandonedTrace implements Connection {
 
-    private static final Map<String, ClientInfoStatus> EMPTY_FAILED_PROPERTIES =
-        Collections.<String, ClientInfoStatus>emptyMap();
+    private static final Map<String, ClientInfoStatus> EMPTY_FAILED_PROPERTIES = Collections
+            .<String, ClientInfoStatus>emptyMap();
 
     /** My delegate {@link Connection}. */
     private volatile C connection;
@@ -79,20 +74,18 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     private Integer defaultQueryTimeoutSeconds;
 
     /**
-     * Creates a wrapper for the Connection which traces this
-     * Connection in the AbandonedObjectPool.
+     * Creates a wrapper for the Connection which traces this Connection in the AbandonedObjectPool.
      *
-     * @param c the {@link Connection} to delegate all calls to.
+     * @param c
+     *            the {@link Connection} to delegate all calls to.
      */
     public DelegatingConnection(final C c) {
         super();
         connection = c;
     }
 
-
     /**
-     * Returns a string representation of the metadata associated with
-     * the innermost delegate connection.
+     * Returns a string representation of the metadata associated with the innermost delegate connection.
      */
     @Override
     public String toString() {
@@ -103,8 +96,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
             try {
                 if (c.isClosed()) {
                     s = "connection is closed";
-                }
-                else {
+                } else {
                     final StringBuffer sb = new StringBuffer();
                     sb.append(hashCode());
                     final DatabaseMetaData meta = c.getMetaData();
@@ -118,8 +110,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
                         s = sb.toString();
                     }
                 }
-            }
-            catch (final SQLException ex) {
+            } catch (final SQLException ex) {
                 // Ignore
             }
         }
@@ -133,6 +124,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
 
     /**
      * Returns my underlying {@link Connection}.
+     * 
      * @return my underlying {@link Connection}.
      */
     public C getDelegate() {
@@ -146,7 +138,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     /**
      * Compares innermost delegate to the given connection.
      *
-     * @param c connection to compare innermost delegate with
+     * @param c
+     *            connection to compare innermost delegate with
      * @return true if innermost delegate equals <code>c</code>
      */
     public boolean innermostDelegateEquals(final Connection c) {
@@ -157,22 +150,16 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         return innerCon.equals(c);
     }
 
-
     /**
-     * If my underlying {@link Connection} is not a
-     * {@code DelegatingConnection}, returns it,
-     * otherwise recursively invokes this method on
-     * my delegate.
+     * If my underlying {@link Connection} is not a {@code DelegatingConnection}, returns it, otherwise recursively
+     * invokes this method on my delegate.
      * <p>
-     * Hence this method will return the first
-     * delegate that is not a {@code DelegatingConnection},
-     * or {@code null} when no non-{@code DelegatingConnection}
-     * delegate can be found by traversing this chain.
+     * Hence this method will return the first delegate that is not a {@code DelegatingConnection}, or {@code null} when
+     * no non-{@code DelegatingConnection} delegate can be found by traversing this chain.
      * </p>
      * <p>
-     * This method is useful when you may have nested
-     * {@code DelegatingConnection}s, and you want to make
-     * sure to obtain a "genuine" {@link Connection}.
+     * This method is useful when you may have nested {@code DelegatingConnection}s, and you want to make sure to obtain
+     * a "genuine" {@link Connection}.
      * </p>
      *
      * @return innermost delegate.
@@ -181,19 +168,17 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         return getInnermostDelegateInternal();
     }
 
-
     /**
-     * Although this method is public, it is part of the internal API and should
-     * not be used by clients. The signature of this method may change at any
-     * time including in ways that break backwards compatibility.
+     * Although this method is public, it is part of the internal API and should not be used by clients. The signature
+     * of this method may change at any time including in ways that break backwards compatibility.
      *
      * @return innermost delegate.
      */
     public final Connection getInnermostDelegateInternal() {
         Connection c = connection;
-        while(c != null && c instanceof DelegatingConnection) {
-            c = ((DelegatingConnection<?>)c).getDelegateInternal();
-            if(this == c) {
+        while (c != null && c instanceof DelegatingConnection) {
+            c = ((DelegatingConnection<?>) c).getDelegateInternal();
+            if (this == c) {
                 return null;
             }
         }
@@ -211,12 +196,11 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     }
 
     /**
-     * Closes the underlying connection, and close any Statements that were not
-     * explicitly closed. Sub-classes that override this method must:
+     * Closes the underlying connection, and close any Statements that were not explicitly closed. Sub-classes that
+     * override this method must:
      * <ol>
      * <li>Call passivate()</li>
-     * <li>Call close (or the equivalent appropriate action) on the wrapped
-     *     connection</li>
+     * <li>Call close (or the equivalent appropriate action) on the wrapped connection</li>
      * <li>Set _closed to <code>false</code></li>
      * </ol>
      */
@@ -256,8 +240,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     }
 
     private void initializeStatement(final DelegatingStatement ds) throws SQLException {
-        if (defaultQueryTimeoutSeconds != null &&
-                defaultQueryTimeoutSeconds.intValue() != ds.getQueryTimeout()) {
+        if (defaultQueryTimeoutSeconds != null && defaultQueryTimeoutSeconds.intValue() != ds.getQueryTimeout()) {
             ds.setQueryTimeout(defaultQueryTimeoutSeconds.intValue());
         }
     }
@@ -266,28 +249,24 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     public Statement createStatement() throws SQLException {
         checkOpen();
         try {
-            final DelegatingStatement ds =
-                    new DelegatingStatement(this, connection.createStatement());
+            final DelegatingStatement ds = new DelegatingStatement(this, connection.createStatement());
             initializeStatement(ds);
             return ds;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public Statement createStatement(final int resultSetType,
-                                     final int resultSetConcurrency) throws SQLException {
+    public Statement createStatement(final int resultSetType, final int resultSetConcurrency) throws SQLException {
         checkOpen();
         try {
-            final DelegatingStatement ds = new DelegatingStatement(
-                    this, connection.createStatement(resultSetType,resultSetConcurrency));
+            final DelegatingStatement ds = new DelegatingStatement(this,
+                    connection.createStatement(resultSetType, resultSetConcurrency));
             initializeStatement(ds);
             return ds;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -297,29 +276,26 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     public PreparedStatement prepareStatement(final String sql) throws SQLException {
         checkOpen();
         try {
-            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
-                    this, connection.prepareStatement(sql));
+            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(this,
+                    connection.prepareStatement(sql));
             initializeStatement(dps);
             return dps;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public PreparedStatement prepareStatement(final String sql,
-                                              final int resultSetType,
-                                              final int resultSetConcurrency) throws SQLException {
+    public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency)
+            throws SQLException {
         checkOpen();
         try {
-            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
-                    this, connection.prepareStatement(sql,resultSetType,resultSetConcurrency));
+            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(this,
+                    connection.prepareStatement(sql, resultSetType, resultSetConcurrency));
             initializeStatement(dps);
             return dps;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -329,35 +305,30 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     public CallableStatement prepareCall(final String sql) throws SQLException {
         checkOpen();
         try {
-            final DelegatingCallableStatement dcs =
-                    new DelegatingCallableStatement(this, connection.prepareCall(sql));
+            final DelegatingCallableStatement dcs = new DelegatingCallableStatement(this, connection.prepareCall(sql));
             initializeStatement(dcs);
             return dcs;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public CallableStatement prepareCall(final String sql,
-                                         final int resultSetType,
-                                         final int resultSetConcurrency) throws SQLException {
+    public CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency)
+            throws SQLException {
         checkOpen();
         try {
-            final DelegatingCallableStatement dcs = new DelegatingCallableStatement(
-                    this, connection.prepareCall(sql, resultSetType,resultSetConcurrency));
+            final DelegatingCallableStatement dcs = new DelegatingCallableStatement(this,
+                    connection.prepareCall(sql, resultSetType, resultSetConcurrency));
             initializeStatement(dcs);
             return dcs;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
-
     @Override
     public void clearWarnings() throws SQLException {
         checkOpen();
@@ -368,7 +339,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public void commit() throws SQLException {
         checkOpen();
@@ -379,11 +349,10 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     /**
      * Returns the state caching flag.
      *
-     * @return  the state caching flag
+     * @return the state caching flag
      */
     public boolean getCacheState() {
         return cacheState;
@@ -404,7 +373,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public String getCatalog() throws SQLException {
         checkOpen();
@@ -416,7 +384,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public DatabaseMetaData getMetaData() throws SQLException {
         checkOpen();
@@ -428,7 +395,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public int getTransactionIsolation() throws SQLException {
         checkOpen();
@@ -440,9 +406,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
-    public Map<String,Class<?>> getTypeMap() throws SQLException {
+    public Map<String, Class<?>> getTypeMap() throws SQLException {
         checkOpen();
         try {
             return connection.getTypeMap();
@@ -452,7 +417,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public SQLWarning getWarnings() throws SQLException {
         checkOpen();
@@ -464,7 +428,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public boolean isReadOnly() throws SQLException {
         checkOpen();
@@ -480,7 +443,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public String nativeSQL(final String sql) throws SQLException {
         checkOpen();
@@ -492,7 +454,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public void rollback() throws SQLException {
         checkOpen();
@@ -503,7 +464,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     /**
      * Gets the default query timeout that will be used for {@link Statement}s created from this connection.
      * <code>null</code> means that the driver default will be used.
@@ -514,7 +474,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         return defaultQueryTimeoutSeconds;
     }
 
-
     /**
      * Sets the default query timeout that will be used for {@link Statement}s created from this connection.
      * <code>null</code> means that the driver default will be used.
@@ -526,25 +485,25 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         this.defaultQueryTimeoutSeconds = defaultQueryTimeoutSeconds;
     }
 
-
     /**
      * Sets the state caching flag.
      *
-     * @param cacheState    The new value for the state caching flag
+     * @param cacheState
+     *            The new value for the state caching flag
      */
     public void setCacheState(final boolean cacheState) {
         this.cacheState = cacheState;
     }
 
     /**
-     * Can be used to clear cached state when it is known that the underlying
-     * connection may have been accessed directly.
+     * Can be used to clear cached state when it is known that the underlying connection may have been accessed
+     * directly.
      */
     public void clearCachedState() {
         autoCommitCached = null;
         readOnlyCached = null;
         if (connection instanceof DelegatingConnection) {
-            ((DelegatingConnection<?>)connection).clearCachedState();
+            ((DelegatingConnection<?>) connection).clearCachedState();
         }
     }
 
@@ -563,8 +522,14 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     }
 
     @Override
-    public void setCatalog(final String catalog) throws SQLException
-    { checkOpen(); try { connection.setCatalog(catalog); } catch (final SQLException e) { handleException(e); } }
+    public void setCatalog(final String catalog) throws SQLException {
+        checkOpen();
+        try {
+            connection.setCatalog(catalog);
+        } catch (final SQLException e) {
+            handleException(e);
+        }
+    }
 
     @Override
     public void setReadOnly(final boolean readOnly) throws SQLException {
@@ -580,7 +545,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public void setTransactionIsolation(final int level) throws SQLException {
         checkOpen();
@@ -591,9 +555,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
-    public void setTypeMap(final Map<String,Class<?>> map) throws SQLException {
+    public void setTypeMap(final Map<String, Class<?>> map) throws SQLException {
         checkOpen();
         try {
             connection.setTypeMap(map);
@@ -608,7 +571,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     }
 
     protected void checkOpen() throws SQLException {
-        if(closed) {
+        if (closed) {
             if (null != connection) {
                 String label = "";
                 try {
@@ -616,19 +579,17 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
                 } catch (final Exception ex) {
                     // ignore, leave label empty
                 }
-                throw new SQLException
-                    ("Connection " + label + " is closed.");
+                throw new SQLException("Connection " + label + " is closed.");
             }
-            throw new SQLException
-                ("Connection is null.");
+            throw new SQLException("Connection is null.");
         }
     }
 
     protected void activate() {
         closed = false;
         setLastUsed();
-        if(connection instanceof DelegatingConnection) {
-            ((DelegatingConnection<?>)connection).activate();
+        if (connection instanceof DelegatingConnection) {
+            ((DelegatingConnection<?>) connection).activate();
         }
     }
 
@@ -637,7 +598,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         // Statement's when it is closed.
         // DBCP-288. Not all the traced objects will be statements
         final List<AbandonedTrace> traces = getTrace();
-        if(traces != null && traces.size() > 0) {
+        if (traces != null && traces.size() > 0) {
             final Iterator<AbandonedTrace> traceIter = traces.iterator();
             while (traceIter.hasNext()) {
                 final Object trace = traceIter.next();
@@ -654,7 +615,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         setLastUsed(0);
     }
 
-
     @Override
     public int getHoldability() throws SQLException {
         checkOpen();
@@ -666,7 +626,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public void setHoldability(final int holdability) throws SQLException {
         checkOpen();
@@ -677,7 +636,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public Savepoint setSavepoint() throws SQLException {
         checkOpen();
@@ -689,7 +647,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public Savepoint setSavepoint(final String name) throws SQLException {
         checkOpen();
@@ -701,7 +658,6 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
     public void rollback(final Savepoint savepoint) throws SQLException {
         checkOpen();
@@ -712,10 +668,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
-    public void releaseSavepoint(final Savepoint savepoint)
-            throws SQLException {
+    public void releaseSavepoint(final Savepoint savepoint) throws SQLException {
         checkOpen();
         try {
             connection.releaseSavepoint(savepoint);
@@ -724,56 +678,46 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
     }
 
-
     @Override
-    public Statement createStatement(final int resultSetType,
-                                     final int resultSetConcurrency,
-                                     final int resultSetHoldability) throws SQLException {
+    public Statement createStatement(final int resultSetType, final int resultSetConcurrency,
+            final int resultSetHoldability) throws SQLException {
         checkOpen();
         try {
             final DelegatingStatement ds = new DelegatingStatement(this,
-                    connection.createStatement(resultSetType, resultSetConcurrency,
-                            resultSetHoldability));
+                    connection.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability));
             initializeStatement(ds);
             return ds;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public PreparedStatement prepareStatement(final String sql, final int resultSetType,
-                                              final int resultSetConcurrency,
-                                              final int resultSetHoldability) throws SQLException {
+    public PreparedStatement prepareStatement(final String sql, final int resultSetType, final int resultSetConcurrency,
+            final int resultSetHoldability) throws SQLException {
         checkOpen();
         try {
-            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
-                    this, connection.prepareStatement(sql, resultSetType,
-                            resultSetConcurrency, resultSetHoldability));
+            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(this,
+                    connection.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability));
             initializeStatement(dps);
             return dps;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
     @Override
-    public CallableStatement prepareCall(final String sql, final int resultSetType,
-                                         final int resultSetConcurrency,
-                                         final int resultSetHoldability) throws SQLException {
+    public CallableStatement prepareCall(final String sql, final int resultSetType, final int resultSetConcurrency,
+            final int resultSetHoldability) throws SQLException {
         checkOpen();
         try {
-            final DelegatingCallableStatement dcs = new DelegatingCallableStatement(
-                    this, connection.prepareCall(sql, resultSetType,
-                            resultSetConcurrency, resultSetHoldability));
+            final DelegatingCallableStatement dcs = new DelegatingCallableStatement(this,
+                    connection.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability));
             initializeStatement(dcs);
             return dcs;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -783,12 +727,11 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     public PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys) throws SQLException {
         checkOpen();
         try {
-            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
-                    this, connection.prepareStatement(sql, autoGeneratedKeys));
+            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(this,
+                    connection.prepareStatement(sql, autoGeneratedKeys));
             initializeStatement(dps);
             return dps;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -798,12 +741,11 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     public PreparedStatement prepareStatement(final String sql, final int columnIndexes[]) throws SQLException {
         checkOpen();
         try {
-            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(
-                    this, connection.prepareStatement(sql, columnIndexes));
+            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(this,
+                    connection.prepareStatement(sql, columnIndexes));
             initializeStatement(dps);
             return dps;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -813,18 +755,16 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
     public PreparedStatement prepareStatement(final String sql, final String columnNames[]) throws SQLException {
         checkOpen();
         try {
-            final DelegatingPreparedStatement dps =  new DelegatingPreparedStatement(
-                    this, connection.prepareStatement(sql, columnNames));
+            final DelegatingPreparedStatement dps = new DelegatingPreparedStatement(this,
+                    connection.prepareStatement(sql, columnNames));
             initializeStatement(dps);
             return dps;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
     }
 
-
     @Override
     public boolean isWrapperFor(final Class<?> iface) throws SQLException {
         if (iface.isAssignableFrom(getClass())) {
@@ -852,8 +792,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.createArrayOf(typeName, elements);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -864,8 +803,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.createBlob();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -876,8 +814,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.createClob();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -888,8 +825,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.createNClob();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -900,8 +836,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.createSQLXML();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -912,8 +847,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.createStruct(typeName, attributes);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -926,8 +860,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         }
         try {
             return connection.isValid(timeout);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return false;
         }
@@ -938,11 +871,9 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         try {
             checkOpen();
             connection.setClientInfo(name, value);
-        }
-        catch (final SQLClientInfoException e) {
+        } catch (final SQLClientInfoException e) {
             throw e;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             throw new SQLClientInfoException("Connection is closed.", EMPTY_FAILED_PROPERTIES, e);
         }
     }
@@ -952,11 +883,9 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         try {
             checkOpen();
             connection.setClientInfo(properties);
-        }
-        catch (final SQLClientInfoException e) {
+        } catch (final SQLClientInfoException e) {
             throw e;
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             throw new SQLClientInfoException("Connection is closed.", EMPTY_FAILED_PROPERTIES, e);
         }
     }
@@ -966,8 +895,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.getClientInfo();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -978,8 +906,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.getClientInfo(name);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -990,8 +917,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             connection.setSchema(schema);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1001,8 +927,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.getSchema();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return null;
         }
@@ -1013,20 +938,17 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             connection.abort(executor);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
 
     @Override
-    public void setNetworkTimeout(final Executor executor, final int milliseconds)
-            throws SQLException {
+    public void setNetworkTimeout(final Executor executor, final int milliseconds) throws SQLException {
         checkOpen();
         try {
             connection.setNetworkTimeout(executor, milliseconds);
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
         }
     }
@@ -1036,8 +958,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
         checkOpen();
         try {
             return connection.getNetworkTimeout();
-        }
-        catch (final SQLException e) {
+        } catch (final SQLException e) {
             handleException(e);
             return 0;
         }


[34/50] [abbrv] commons-dbcp git commit: Javadoc nits.

Posted by gg...@apache.org.
Javadoc 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/55cc86aa
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/55cc86aa
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/55cc86aa

Branch: refs/heads/release
Commit: 55cc86aad77dace617c745575e9fec173504a56f
Parents: 18e6a97
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:48:16 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:48:16 2018 -0600

----------------------------------------------------------------------
 .../apache/commons/dbcp2/AbandonedTrace.java    | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/55cc86aa/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
index 48101f2..77b5441 100644
--- a/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
+++ b/src/main/java/org/apache/commons/dbcp2/AbandonedTrace.java
@@ -34,14 +34,14 @@ import org.apache.commons.pool2.TrackedUse;
  */
 public class AbandonedTrace implements TrackedUse {
 
-    /** A list of objects created by children of this object */
+    /** A list of objects created by children of this object. */
     private final List<WeakReference<AbandonedTrace>> traceList = new ArrayList<>();
 
-    /** Last time this connection was used */
+    /** Last time this connection was used. */
     private volatile long lastUsedMillis = 0;
 
     /**
-     * Create a new AbandonedTrace without config and without doing abandoned tracing.
+     * Creates a new AbandonedTrace without config and without doing abandoned tracing.
      */
     public AbandonedTrace() {
         init(null);
@@ -50,7 +50,7 @@ public class AbandonedTrace implements TrackedUse {
     /**
      * Constructs a new AbandonedTrace with a parent object.
      *
-     * @param parent AbandonedTrace parent object
+     * @param parent AbandonedTrace parent object.
      */
     public AbandonedTrace(final AbandonedTrace parent) {
         init(parent);
@@ -59,7 +59,7 @@ public class AbandonedTrace implements TrackedUse {
     /**
      * Initializes abandoned tracing for this object.
      *
-     * @param parent AbandonedTrace parent object
+     * @param parent AbandonedTrace parent object.
      */
     private void init(final AbandonedTrace parent) {
         if (parent != null) {
@@ -70,7 +70,7 @@ public class AbandonedTrace implements TrackedUse {
     /**
      * Gets the last time this object was used in milliseconds.
      *
-     * @return long time in milliseconds
+     * @return long time in milliseconds.
      */
     @Override
     public long getLastUsed() {
@@ -88,7 +88,7 @@ public class AbandonedTrace implements TrackedUse {
      * Sets the time in milliseconds this object was last used.
      *
      * @param lastUsedMillis
-     *            time in milliseconds
+     *            time in milliseconds.
      */
     protected void setLastUsed(final long lastUsedMillis) {
         this.lastUsedMillis = lastUsedMillis;
@@ -98,7 +98,7 @@ public class AbandonedTrace implements TrackedUse {
      * Adds an object to the list of objects being traced.
      *
      * @param trace
-     *            AbandonedTrace object to add
+     *            AbandonedTrace object to add.
      */
     protected void addTrace(final AbandonedTrace trace) {
         synchronized (this.traceList) {
@@ -119,7 +119,7 @@ public class AbandonedTrace implements TrackedUse {
     /**
      * Gets a list of objects being traced by this object.
      *
-     * @return List of objects
+     * @return List of objects.
      */
     protected List<AbandonedTrace> getTrace() {
         final int size = traceList.size();
@@ -146,7 +146,7 @@ public class AbandonedTrace implements TrackedUse {
      * Removes a child object this object is tracing.
      *
      * @param trace
-     *            AbandonedTrace object to remove
+     *            AbandonedTrace object to remove.
      */
     protected void removeTrace(final AbandonedTrace trace) {
         synchronized(this.traceList) {


[15/50] [abbrv] commons-dbcp git commit: Add missing Javadoc.

Posted by gg...@apache.org.
Add missing Javadoc.

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

Branch: refs/heads/release
Commit: 8ab7cc1b702075088fb4bc859302e77ee5d0d2fa
Parents: 5cc5624
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:51:22 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:51:22 2018 -0600

----------------------------------------------------------------------
 .../commons/dbcp2/managed/ManagedConnection.java       | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/8ab7cc1b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
index 3d0289f..91fed32 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
@@ -45,6 +45,7 @@ import java.util.concurrent.locks.ReentrantLock;
  * @since 2.0
  */
 public class ManagedConnection<C extends Connection> extends DelegatingConnection<C> {
+    
     private final ObjectPool<C> pool;
     private final TransactionRegistry transactionRegistry;
     private final boolean accessToUnderlyingConnectionAllowed;
@@ -52,6 +53,18 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
     private boolean isSharedConnection;
     private final Lock lock;
 
+    /**
+     * Constructs a new instance responsible for managing a database connection in a transactional environment.
+     * 
+     * @param pool
+     *            The connection pool.
+     * @param transactionRegistry
+     *            The transaction registry.
+     * @param accessToUnderlyingConnectionAllowed
+     *            Whether or not to allow access to the underlying Connection.
+     * @throws SQLException
+     *             Thrown when there is problem managing transactions.
+     */
     public ManagedConnection(final ObjectPool<C> pool, final TransactionRegistry transactionRegistry,
             final boolean accessToUnderlyingConnectionAllowed) throws SQLException {
         super(null);


[04/50] [abbrv] commons-dbcp git commit: Add missing Javadoc HTML tags.

Posted by gg...@apache.org.
Add missing Javadoc HTML tags.

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

Branch: refs/heads/release
Commit: c2999dfde9d33635ce8d9fc5ade5ae19d7f32c22
Parents: a3ff0a8
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:12:44 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:12:44 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/DelegatingResultSet.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/c2999dfd/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
index 3e2424e..53beeab 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -45,11 +45,13 @@ import java.util.Map;
  * All of the methods from the {@link ResultSet} interface
  * simply call the corresponding method on the "delegate"
  * provided in my constructor.
+ * </p>
  * <p>
  * Extends AbandonedTrace to implement result set tracking and
  * logging of code which created the ResultSet. Tracking the
  * ResultSet ensures that the Statement which created it can
  * close any open ResultSet's on Statement close.
+ * </p>
  *
  * @since 2.0
  */
@@ -65,12 +67,13 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     private Connection connection;
 
     /**
-     * Create a wrapper for the ResultSet which traces this
+     * Creates a wrapper for the ResultSet which traces this
      * ResultSet to the Statement which created it and the
      * code which created it.
      * <p>
      * Private to ensure all construction is
      * {@link #wrapResultSet(Statement, ResultSet)}
+     * </p>
      *
      * @param stmt Statement which created this ResultSet
      * @param res ResultSet to wrap
@@ -82,12 +85,13 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
     }
 
     /**
-     * Create a wrapper for the ResultSet which traces this
+     * Creates a wrapper for the ResultSet which traces this
      * ResultSet to the Connection which created it (via, for
      * example DatabaseMetadata, and the code which created it.
      * <p>
      * Private to ensure all construction is
      * {@link #wrapResultSet(Connection, ResultSet)}
+     * </p>
      *
      * @param conn Connection which created this ResultSet
      * @param res ResultSet to wrap
@@ -126,10 +130,12 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
      * delegate that is not a {@code DelegatingResultSet},
      * or {@code null} when no non-{@code DelegatingResultSet}
      * delegate can be found by traversing this chain.
+     * </p>
      * <p>
      * This method is useful when you may have nested
      * {@code DelegatingResultSet}s, and you want to make
      * sure to obtain a "genuine" {@link ResultSet}.
+     * </p>
      */
     public ResultSet getInnermostDelegate() {
         ResultSet r = resultSet;


[47/50] [abbrv] commons-dbcp git commit: Key for that matches my @apache email.

Posted by gg...@apache.org.
Key for that matches my @apache email.

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

Branch: refs/heads/release
Commit: e50c52284e0d3fc47853e16ff9d2f30d10f3c5ee
Parents: 411cf62
Author: Gary Gregory <ga...@gmail.com>
Authored: Wed Jun 13 11:18:34 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Jun 13 11:18:34 2018 -0600

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/e50c5228/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index da1c7ed..4387356 100644
--- a/pom.xml
+++ b/pom.xml
@@ -305,7 +305,7 @@
     <commons.release.isDistModule>true</commons.release.isDistModule>
     <commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl>
     <commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>    
-    <commons.releaseManagerKey>2DB4F1EF0FA761ECC4EA935C86FDC7E2A11262CB</commons.releaseManagerKey>    
+    <commons.releaseManagerKey>86fdc7e2a11262cb</commons.releaseManagerKey>
   </properties>
 
   <build>


[22/50] [abbrv] commons-dbcp git commit: Line length 120.

Posted by gg...@apache.org.
Line length 120.

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

Branch: refs/heads/release
Commit: 0eca91ae405f281e734337024bf499bc2e90c8dc
Parents: 75199a4
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:01:31 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:01:31 2018 -0600

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


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/0eca91ae/src/main/java/org/apache/commons/dbcp2/Constants.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/Constants.java b/src/main/java/org/apache/commons/dbcp2/Constants.java
index 5670248..ee25580 100644
--- a/src/main/java/org/apache/commons/dbcp2/Constants.java
+++ b/src/main/java/org/apache/commons/dbcp2/Constants.java
@@ -18,18 +18,17 @@ package org.apache.commons.dbcp2;
 
 /**
  * Constants for use with JMX
+ * 
  * @since 2.0
  */
 public class Constants {
+
     public static final String JMX_CONNECTION_POOL_BASE_EXT = ",connectionpool=";
     public static final String JMX_CONNECTION_POOL_PREFIX = "connections";
 
-    public static final String JMX_CONNECTION_BASE_EXT =
-            JMX_CONNECTION_POOL_BASE_EXT +
-            JMX_CONNECTION_POOL_PREFIX +
-            ",connection=";
+    public static final String JMX_CONNECTION_BASE_EXT = JMX_CONNECTION_POOL_BASE_EXT + JMX_CONNECTION_POOL_PREFIX
+            + ",connection=";
 
-    public static final String JMX_STATEMENT_POOL_BASE_EXT =
-            JMX_CONNECTION_BASE_EXT;
+    public static final String JMX_STATEMENT_POOL_BASE_EXT = JMX_CONNECTION_BASE_EXT;
     public static final String JMX_STATEMENT_POOL_PREFIX = ",statementpool=statements";
 }


[30/50] [abbrv] commons-dbcp git commit: Javadoc and line length 120.

Posted by gg...@apache.org.
Javadoc and line length 120.

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

Branch: refs/heads/release
Commit: 16626a9b8fdecf3fa80876a244ff74dd171b06cd
Parents: 3df2257
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:42:14 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:42:14 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/commons/dbcp2/PStmtKey.java | 290 ++++++++++++++++---
 1 file changed, 246 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/16626a9b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
index 36b3c09..6fc5f65 100644
--- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
+++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
@@ -26,6 +26,7 @@ import org.apache.commons.dbcp2.PoolingConnection.StatementType;
 
 /**
  * A key uniquely identifying {@link java.sql.PreparedStatement PreparedStatement}s.
+ * 
  * @since 2.0
  */
 public class PStmtKey {
@@ -60,18 +61,42 @@ public class PStmtKey {
     /** Statement builder */
     private StatementBuilder builder;
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     */
     public PStmtKey(final String sql) {
         this(sql, null, StatementType.PREPARED_STATEMENT);
     }
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     */
     public PStmtKey(final String sql, final String catalog) {
         this(sql, catalog, StatementType.PREPARED_STATEMENT);
     }
 
-    public PStmtKey(final String sql, final String catalog, final StatementType stmtType) {
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param statementType
+     *            The SQL statement type, prepared or callable.
+     */
+    public PStmtKey(final String sql, final String catalog, final StatementType statementType) {
         this.sql = sql;
         this.catalog = catalog;
-        this.statementType = stmtType;
+        this.statementType = statementType;
         this.autoGeneratedKeys = null;
         this.columnIndexes = null;
         this.columnNames = null;
@@ -79,21 +104,46 @@ public class PStmtKey {
         this.resultSetConcurrency = null;
         this.resultSetHoldability = null;
         // create builder
-        if (stmtType == StatementType.PREPARED_STATEMENT) {
+        if (statementType == StatementType.PREPARED_STATEMENT) {
             this.builder = new PreparedStatementSQL();
-        } else if (stmtType == StatementType.CALLABLE_STATEMENT) {
+        } else if (statementType == StatementType.CALLABLE_STATEMENT) {
             this.builder = new PreparedCallSQL();
         }
     }
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param autoGeneratedKeys
+     *            A flag indicating whether auto-generated keys should be returned; one of
+     *            <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>.
+     */
     public PStmtKey(final String sql, final String catalog, final int autoGeneratedKeys) {
         this(sql, catalog, StatementType.PREPARED_STATEMENT, Integer.valueOf(autoGeneratedKeys));
     }
 
-    public PStmtKey(final String sql, final String catalog, final StatementType stmtType, final Integer autoGeneratedKeys) {
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param statementType
+     *            The SQL statement type, prepared or callable.
+     * @param autoGeneratedKeys
+     *            A flag indicating whether auto-generated keys should be returned; one of
+     *            <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>.
+     */
+    public PStmtKey(final String sql, final String catalog, final StatementType statementType,
+            final Integer autoGeneratedKeys) {
         this.sql = sql;
         this.catalog = catalog;
-        this.statementType = stmtType;
+        this.statementType = statementType;
         this.autoGeneratedKeys = autoGeneratedKeys;
         this.columnIndexes = null;
         this.columnNames = null;
@@ -101,13 +151,24 @@ public class PStmtKey {
         this.resultSetConcurrency = null;
         this.resultSetHoldability = null;
         // create builder
-        if (stmtType == StatementType.PREPARED_STATEMENT) {
+        if (statementType == StatementType.PREPARED_STATEMENT) {
             this.builder = new PreparedStatementWithAutoGeneratedKeys();
-        } else if (stmtType == StatementType.CALLABLE_STATEMENT) {
+        } else if (statementType == StatementType.CALLABLE_STATEMENT) {
             this.builder = new PreparedCallSQL();
         }
     }
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param columnIndexes
+     *            An array of column indexes indicating the columns that should be returned from the inserted row or
+     *            rows.
+     */
     public PStmtKey(final String sql, final String catalog, final int[] columnIndexes) {
         this.sql = sql;
         this.catalog = catalog;
@@ -122,6 +183,16 @@ public class PStmtKey {
         this.builder = new PreparedStatementWithColumnIndexes();
     }
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param columnNames
+     *            An array of column names indicating the columns that should be returned from the inserted row or rows.
+     */
     public PStmtKey(final String sql, final String catalog, final String[] columnNames) {
         this.sql = sql;
         this.catalog = catalog;
@@ -136,89 +207,216 @@ public class PStmtKey {
         builder = new PreparedStatementWithColumnNames();
     }
 
-    public  PStmtKey(final String sql, final int resultSetType, final int resultSetConcurrency) {
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param resultSetType
+     *            A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
+     *            <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>.
+     * @param resultSetConcurrency
+     *            A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
+     *            <code>ResultSet.CONCUR_UPDATABLE</code>.
+     */
+    public PStmtKey(final String sql, final int resultSetType, final int resultSetConcurrency) {
         this(sql, null, resultSetType, resultSetConcurrency, StatementType.PREPARED_STATEMENT);
     }
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param resultSetType
+     *            A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
+     *            <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>.
+     * @param resultSetConcurrency
+     *            A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
+     *            <code>ResultSet.CONCUR_UPDATABLE</code>.
+     */
     public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency) {
         this(sql, catalog, resultSetType, resultSetConcurrency, StatementType.PREPARED_STATEMENT);
     }
 
-    public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency, final StatementType stmtType) {
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param resultSetType
+     *            A result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
+     *            <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>.
+     * @param resultSetConcurrency
+     *            A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
+     *            <code>ResultSet.CONCUR_UPDATABLE</code>.
+     * @param statementType
+     *            The SQL statement type, prepared or callable.
+     */
+    public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency,
+            final StatementType statementType) {
         this.sql = sql;
         this.catalog = catalog;
         this.resultSetType = Integer.valueOf(resultSetType);
         this.resultSetConcurrency = Integer.valueOf(resultSetConcurrency);
         this.resultSetHoldability = null;
-        this.statementType = stmtType;
+        this.statementType = statementType;
         this.autoGeneratedKeys = null;
         this.columnIndexes = null;
         this.columnNames = null;
         // create builder
-        if (stmtType == StatementType.PREPARED_STATEMENT) {
+        if (statementType == StatementType.PREPARED_STATEMENT) {
             this.builder = new PreparedStatementWithResultSetConcurrency();
-        } else if (stmtType == StatementType.CALLABLE_STATEMENT) {
+        } else if (statementType == StatementType.CALLABLE_STATEMENT) {
             this.builder = new PreparedCallWithResultSetConcurrency();
         }
     }
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param resultSetType
+     *            a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
+     *            <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>.
+     * @param resultSetConcurrency
+     *            A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
+     *            <code>ResultSet.CONCUR_UPDATABLE</code>
+     * @param resultSetHoldability
+     *            One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code>
+     *            or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>.
+     */
     public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency,
             final int resultSetHoldability) {
         this(sql, catalog, resultSetType, resultSetConcurrency, resultSetHoldability, StatementType.PREPARED_STATEMENT);
     }
 
+    /**
+     * Constructs a key to uniquely identify a prepared statement.
+     * 
+     * @param sql
+     *            The SQL statement.
+     * @param catalog
+     *            The catalog.
+     * @param resultSetType
+     *            a result set type; one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
+     *            <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
+     * @param resultSetConcurrency
+     *            A concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
+     *            <code>ResultSet.CONCUR_UPDATABLE</code>.
+     * @param resultSetHoldability
+     *            One of the following <code>ResultSet</code> constants: <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code>
+     *            or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>.
+     * @param statementType
+     *            The SQL statement type, prepared or callable.
+     */
     public PStmtKey(final String sql, final String catalog, final int resultSetType, final int resultSetConcurrency,
-            final int resultSetHoldability, final StatementType stmtType) {
+            final int resultSetHoldability, final StatementType statementType) {
         this.sql = sql;
         this.catalog = catalog;
         this.resultSetType = Integer.valueOf(resultSetType);
         this.resultSetConcurrency = Integer.valueOf(resultSetConcurrency);
         this.resultSetHoldability = Integer.valueOf(resultSetHoldability);
-        this.statementType = stmtType;
+        this.statementType = statementType;
         this.autoGeneratedKeys = null;
         this.columnIndexes = null;
         this.columnNames = null;
         // create builder
-        if (stmtType == StatementType.PREPARED_STATEMENT) {
+        if (statementType == StatementType.PREPARED_STATEMENT) {
             this.builder = new PreparedStatementWithResultSetHoldability();
-        } else if (stmtType == StatementType.CALLABLE_STATEMENT) {
+        } else if (statementType == StatementType.CALLABLE_STATEMENT) {
             this.builder = new PreparedCallWithResultSetHoldability();
         }
     }
 
-
+    /**
+     * Gets the SQL statement.
+     * 
+     * @return the SQL statement.
+     */
     public String getSql() {
         return sql;
     }
 
+    /**
+     * Gets the result set type, one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
+     * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>.
+     * 
+     * @return the result set type.
+     */
     public Integer getResultSetType() {
         return resultSetType;
     }
 
+    /**
+     * Gets the result set concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
+     * <code>ResultSet.CONCUR_UPDATABLE</code>.
+     * 
+     * @return The result set concurrency type.
+     */
     public Integer getResultSetConcurrency() {
         return resultSetConcurrency;
     }
 
+    /**
+     * Gets the result set holdability, one of the following <code>ResultSet</code> constants:
+     * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>.
+     * 
+     * @return The result set holdability.
+     */
     public Integer getResultSetHoldability() {
         return resultSetHoldability;
     }
 
+    /**
+     * Gets a flag indicating whether auto-generated keys should be returned; one of
+     * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>.
+     * 
+     * @return a flag indicating whether auto-generated keys should be returned.
+     */
     public Integer getAutoGeneratedKeys() {
         return autoGeneratedKeys;
     }
 
+    /**
+     * Gets an array of column indexes indicating the columns that should be returned from the inserted row or rows.
+     * 
+     * @return An array of column indexes.
+     */
     public int[] getColumnIndexes() {
         return columnIndexes;
     }
 
+    /**
+     * Gets an array of column names indicating the columns that should be returned from the inserted row or rows.
+     * 
+     * @return An array of column names.
+     */
     public String[] getColumnNames() {
         return columnNames;
     }
 
+    /**
+     * The catalog.
+     * 
+     * @return The catalog.
+     */
     public String getCatalog() {
         return catalog;
     }
 
+    /**
+     * The SQL statement type.
+     * 
+     * @return The SQL statement type.
+     */
     public StatementType getStmtType() {
         return statementType;
     }
@@ -329,6 +527,15 @@ public class PStmtKey {
         return buf.toString();
     }
 
+    /**
+     * Creates a new Statement from the given Connection.
+     * 
+     * @param connection
+     *            The Connection to use to create the statement.
+     * @return The statement.
+     * @throws SQLException
+     *             Thrown when there is a problem creating the statement.
+     */
     public Statement createStatement(final Connection connection) throws SQLException {
         if (builder == null) {
             throw new IllegalStateException("Prepared statement key is invalid.");
@@ -337,14 +544,14 @@ public class PStmtKey {
     }
 
     /**
-     * Interface for Prepared or Callable Statement
+     * Interface for Prepared or Callable Statement.
      */
     private interface StatementBuilder {
         public Statement createStatement(Connection connection) throws SQLException;
     }
 
     /**
-     * Builder for prepareStatement(String sql)
+     * Builder for prepareStatement(String sql).
      */
     private class PreparedStatementSQL implements StatementBuilder {
         @Override
@@ -355,68 +562,64 @@ public class PStmtKey {
     }
 
     /**
-     * Builder for prepareStatement(String sql, int autoGeneratedKeys)
+     * Builder for prepareStatement(String sql, int autoGeneratedKeys).
      */
     private class PreparedStatementWithAutoGeneratedKeys implements StatementBuilder {
         @Override
         public Statement createStatement(final Connection connection) throws SQLException {
-            final PreparedStatement statement = connection.prepareStatement(
-                    sql, autoGeneratedKeys.intValue());
+            final PreparedStatement statement = connection.prepareStatement(sql, autoGeneratedKeys.intValue());
             return statement;
         }
     }
 
     /**
-     * Builder for prepareStatement(String sql, int[] columnIndexes)
+     * Builder for prepareStatement(String sql, int[] columnIndexes).
      */
     private class PreparedStatementWithColumnIndexes implements StatementBuilder {
         @Override
         public Statement createStatement(final Connection connection) throws SQLException {
-            final PreparedStatement statement = connection.prepareStatement(
-                    sql, columnIndexes);
+            final PreparedStatement statement = connection.prepareStatement(sql, columnIndexes);
             return statement;
         }
     }
 
     /**
-     * Builder for prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
+     * Builder for prepareStatement(String sql, int resultSetType, int resultSetConcurrency).
      */
     private class PreparedStatementWithResultSetConcurrency implements StatementBuilder {
         @Override
         public Statement createStatement(final Connection connection) throws SQLException {
-            final PreparedStatement statement = connection.prepareStatement(
-                    sql, resultSetType.intValue(), resultSetConcurrency.intValue());
+            final PreparedStatement statement = connection.prepareStatement(sql, resultSetType.intValue(),
+                    resultSetConcurrency.intValue());
             return statement;
         }
     }
 
     /**
-     * Builder for prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
+     * Builder for prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability).
      */
     private class PreparedStatementWithResultSetHoldability implements StatementBuilder {
         @Override
         public Statement createStatement(final Connection connection) throws SQLException {
-            final PreparedStatement statement = connection.prepareStatement(
-                    sql, resultSetType.intValue(), resultSetConcurrency.intValue(),
-                    resultSetHoldability.intValue());
+            final PreparedStatement statement = connection.prepareStatement(sql, resultSetType.intValue(),
+                    resultSetConcurrency.intValue(), resultSetHoldability.intValue());
             return statement;
         }
     }
 
     /**
-     * Builder for prepareStatement(String sql, String[] columnNames)
+     * Builder for prepareStatement(String sql, String[] columnNames).
      */
     private class PreparedStatementWithColumnNames implements StatementBuilder {
         @Override
         public Statement createStatement(final Connection connection) throws SQLException {
-            final PreparedStatement statement = connection.prepareStatement(
-                    sql, columnNames);
+            final PreparedStatement statement = connection.prepareStatement(sql, columnNames);
             return statement;
         }
     }
 
     /**
-     * Builder for prepareCall(String sql)
+     * Builder for prepareCall(String sql).
      */
     private class PreparedCallSQL implements StatementBuilder {
         @Override
@@ -427,26 +630,25 @@ public class PStmtKey {
     }
 
     /**
-     * Builder for prepareCall(String sql, int resultSetType, int resultSetConcurrency)
+     * Builder for prepareCall(String sql, int resultSetType, int resultSetConcurrency).
      */
     private class PreparedCallWithResultSetConcurrency implements StatementBuilder {
         @Override
         public Statement createStatement(final Connection connection) throws SQLException {
-            final PreparedStatement statement = connection.prepareCall(
-                    sql, resultSetType.intValue(), resultSetConcurrency.intValue());
+            final PreparedStatement statement = connection.prepareCall(sql, resultSetType.intValue(),
+                    resultSetConcurrency.intValue());
             return statement;
         }
     }
 
     /**
-     * Builder for prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
+     * Builder for prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability).
      */
     private class PreparedCallWithResultSetHoldability implements StatementBuilder {
         @Override
         public Statement createStatement(final Connection connection) throws SQLException {
-            final PreparedStatement statement = connection.prepareCall(
-                    sql, resultSetType.intValue(), resultSetConcurrency.intValue(),
-                    resultSetHoldability.intValue());
+            final PreparedStatement statement = connection.prepareCall(sql, resultSetType.intValue(),
+                    resultSetConcurrency.intValue(), resultSetHoldability.intValue());
             return statement;
         }
     }


[26/50] [abbrv] commons-dbcp git commit: Javadoc, better param names, line length 120.

Posted by gg...@apache.org.
Javadoc, better param names, line length 120.

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

Branch: refs/heads/release
Commit: 6aa057ff95f0c14a7fcb562020d71bde571c2e87
Parents: f20a569
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:12:19 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:12:19 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/commons/dbcp2/Utils.java    | 70 ++++++++++++--------
 1 file changed, 41 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/6aa057ff/src/main/java/org/apache/commons/dbcp2/Utils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/Utils.java b/src/main/java/org/apache/commons/dbcp2/Utils.java
index 80c80ea..059f3d9 100644
--- a/src/main/java/org/apache/commons/dbcp2/Utils.java
+++ b/src/main/java/org/apache/commons/dbcp2/Utils.java
@@ -28,15 +28,18 @@ import java.util.Set;
 
 /**
  * Utility methods.
+ * 
  * @since 2.0
  */
 public final class Utils {
 
-    private static final ResourceBundle messages = ResourceBundle.getBundle(
-            Utils.class.getPackage().getName() + ".LocalStrings");
+    private static final ResourceBundle messages = ResourceBundle
+            .getBundle(Utils.class.getPackage().getName() + ".LocalStrings");
 
-    public static final boolean IS_SECURITY_ENABLED =
-            System.getSecurityManager() != null;
+    /**
+     * Whether the security manager is enabled.
+     */
+    public static final boolean IS_SECURITY_ENABLED = System.getSecurityManager() != null;
 
     /** Any SQL_STATE starting with this value is considered a fatal disconnect */
     public static final String DISCONNECTION_SQL_CODE_PREFIX = "08";
@@ -44,12 +47,12 @@ public final class Utils {
     /**
      * SQL codes of fatal connection errors.
      * <ul>
-     *  <li>57P01 (ADMIN SHUTDOWN)</li>
-     *  <li>57P02 (CRASH SHUTDOWN)</li>
-     *  <li>57P03 (CANNOT CONNECT NOW)</li>
-     *  <li>01002 (SQL92 disconnect error)</li>
-     *  <li>JZ0C0 (Sybase disconnect error)</li>
-     *  <li>JZ0C1 (Sybase disconnect error)</li>
+     * <li>57P01 (ADMIN SHUTDOWN)</li>
+     * <li>57P02 (CRASH SHUTDOWN)</li>
+     * <li>57P03 (CANNOT CONNECT NOW)</li>
+     * <li>01002 (SQL92 disconnect error)</li>
+     * <li>JZ0C0 (Sybase disconnect error)</li>
+     * <li>JZ0C1 (Sybase disconnect error)</li>
      * </ul>
      */
     public static final Set<String> DISCONNECTION_SQL_CODES;
@@ -71,12 +74,13 @@ public final class Utils {
     /**
      * Closes the ResultSet (which may be null).
      *
-     * @param rset a ResultSet, may be {@code null}
+     * @param resultSet
+     *            a ResultSet, may be {@code null}
      */
-    public static void closeQuietly(final ResultSet rset) {
-        if (rset != null) {
+    public static void closeQuietly(final ResultSet resultSet) {
+        if (resultSet != null) {
             try {
-                rset.close();
+                resultSet.close();
             } catch (final Exception e) {
                 // ignored
             }
@@ -86,12 +90,13 @@ public final class Utils {
     /**
      * Closes the Connection (which may be null).
      *
-     * @param conn a Connection, may be {@code null}
+     * @param connection
+     *            a Connection, may be {@code null}
      */
-    public static void closeQuietly(final Connection conn) {
-        if (conn != null) {
+    public static void closeQuietly(final Connection connection) {
+        if (connection != null) {
             try {
-                conn.close();
+                connection.close();
             } catch (final Exception e) {
                 // ignored
             }
@@ -101,33 +106,41 @@ public final class Utils {
     /**
      * Closes the Statement (which may be null).
      *
-     * @param stmt a Statement, may be {@code null}
+     * @param statement
+     *            a Statement, may be {@code null}.
      */
-    public static void closeQuietly(final Statement stmt) {
-        if (stmt != null) {
+    public static void closeQuietly(final Statement statement) {
+        if (statement != null) {
             try {
-                stmt.close();
+                statement.close();
             } catch (final Exception e) {
                 // ignored
             }
         }
     }
 
-
     /**
-     * Obtain the correct i18n message for the given key.
+     * Gets the correct i18n message for the given key.
+     * 
+     * @param key
+     *            The key to look up an i18n message.
+     * @return The i18n message.
      */
     public static String getMessage(final String key) {
         return getMessage(key, (Object[]) null);
     }
 
-
     /**
-     * Obtain the correct i18n message for the given key with placeholders
-     * replaced by the supplied arguments.
+     * Gets the correct i18n message for the given key with placeholders replaced by the supplied arguments.
+     * 
+     * @param key
+     *            A message key.
+     * @param args
+     *            The message arguments.
+     * @return An i18n message.
      */
     public static String getMessage(final String key, final Object... args) {
-        final String msg =  messages.getString(key);
+        final String msg = messages.getString(key);
         if (args == null || args.length == 0) {
             return msg;
         }
@@ -146,7 +159,6 @@ public final class Utils {
         return value != null ? value.toCharArray() : null;
     }
 
-
     /**
      * Converts the given char[] to a String.
      *


[16/50] [abbrv] commons-dbcp git commit: Javadoc.

Posted by gg...@apache.org.
Javadoc.

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

Branch: refs/heads/release
Commit: 9a61dc02faf30447bc37d45c79d846c61be5f462
Parents: 8ab7cc1
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:54:08 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:54:08 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/BasicDataSourceFactory.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/9a61dc02/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
index a356e85..dfd27e9 100644
--- a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
@@ -326,11 +326,13 @@ public class BasicDataSourceFactory implements ObjectFactory {
     }
 
     /**
-     * Creates and configures a {@link BasicDataSource} instance based on the
-     * given properties.
+     * Creates and configures a {@link BasicDataSource} instance based on the given properties.
      *
-     * @param properties the datasource configuration properties
-     * @throws Exception if an error occurs creating the data source
+     * @param properties
+     *            The data source configuration properties.
+     * @return A new a {@link BasicDataSource} instance based on the given properties.
+     * @throws Exception
+     *             Thrown when an error occurs creating the data source.
      */
     public static BasicDataSource createDataSource(final Properties properties) throws Exception {
         final BasicDataSource dataSource = new BasicDataSource();


[46/50] [abbrv] commons-dbcp git commit: Remove trailing white spaces on all lines.

Posted by gg...@apache.org.
Remove trailing white spaces on all lines.

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

Branch: refs/heads/release
Commit: 411cf6223e17554a0cb1f2c7ea4113391ba437f1
Parents: 518adf6
Author: Gary Gregory <ga...@gmail.com>
Authored: Wed Jun 13 11:17:55 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Jun 13 11:17:55 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/commons/dbcp2/BasicDataSourceFactory.java  | 4 ++--
 .../java/org/apache/commons/dbcp2/DelegatingConnection.java    | 2 +-
 .../java/org/apache/commons/dbcp2/DelegatingStatement.java     | 2 +-
 .../apache/commons/dbcp2/DriverManagerConnectionFactory.java   | 6 +++---
 .../org/apache/commons/dbcp2/PoolableConnectionFactory.java    | 4 ++--
 .../org/apache/commons/dbcp2/PoolableConnectionMXBean.java     | 2 +-
 .../org/apache/commons/dbcp2/PoolablePreparedStatement.java    | 2 +-
 src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java  | 2 +-
 src/main/java/org/apache/commons/dbcp2/PoolingDriver.java      | 2 +-
 .../org/apache/commons/dbcp2/SwallowedExceptionLogger.java     | 2 +-
 src/main/java/org/apache/commons/dbcp2/package-info.java       | 6 +++---
 11 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
index 46af519..69c2cb9 100644
--- a/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSourceFactory.java
@@ -556,7 +556,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
      * <p>
      * Parse properties from the string. Format of the string must be [propertyName=property;]*
      * <p>
-     * 
+     *
      * @param propText
      * @return Properties
      * @throws Exception
@@ -571,7 +571,7 @@ public class BasicDataSourceFactory implements ObjectFactory {
 
     /**
      * Parse list of property values from a delimited string
-     * 
+     *
      * @param value
      *            delimited list of values
      * @param delimiter

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index d6db252..1356efa 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -124,7 +124,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i
 
     /**
      * Returns my underlying {@link Connection}.
-     * 
+     *
      * @return my underlying {@link Connection}.
      */
     public C getDelegate() {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
index 098950d..7cce5e2 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
@@ -78,7 +78,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
      * This method is useful when you may have nested {@code DelegatingStatement}s, and you want to make sure to obtain
      * a "genuine" {@link Statement}.
      * </p>
-     * 
+     *
      * @return The innermost delegate.
      *
      * @see #getDelegate

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
index 7c62ed5..00c7484 100644
--- a/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/DriverManagerConnectionFactory.java
@@ -40,7 +40,7 @@ public class DriverManagerConnectionFactory implements ConnectionFactory {
 
     /**
      * Constructor for DriverManagerConnectionFactory.
-     * 
+     *
      * @param connectionUri
      *            a database url of the form <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
      * @since 2.2
@@ -52,7 +52,7 @@ public class DriverManagerConnectionFactory implements ConnectionFactory {
 
     /**
      * Constructor for DriverManagerConnectionFactory.
-     * 
+     *
      * @param connectionUri
      *            a database url of the form <code> jdbc:<em>subprotocol</em>:<em>subname</em></code>
      * @param properties
@@ -66,7 +66,7 @@ public class DriverManagerConnectionFactory implements ConnectionFactory {
 
     /**
      * Constructor for DriverManagerConnectionFactory.
-     * 
+     *
      * @param connectionUri
      *            a database url of the form <code>jdbc:<em>subprotocol</em>:<em>subname</em></code>
      * @param userName

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
index 5d3c396..9ff815b 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
@@ -167,7 +167,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
 
     /**
      * Deprecated due to typo in method name.
-     * 
+     *
      * @param maxOpenPreparedStatements
      *            The maximum number of open prepared statements.
      * @deprecated Use {@link #setMaxOpenPreparedStatements(int)}.
@@ -179,7 +179,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
 
     /**
      * Sets the maximum number of open prepared statements.
-     * 
+     *
      * @param maxOpenPreparedStatements
      *            The maximum number of open prepared statements.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
index 1601ab4..5273baa 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionMXBean.java
@@ -20,7 +20,7 @@ import java.sql.SQLException;
 
 /**
  * Defines the attributes and methods that will be exposed via JMX for {@link PoolableConnection} instances.
- * 
+ *
  * @since 2.0
  */
 public interface PoolableConnectionMXBean {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
index 21676b6..15d933e 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
@@ -51,7 +51,7 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
 
     /**
      * Constructor
-     * 
+     *
      * @param stmt
      *            my underlying {@link PreparedStatement}
      * @param key

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
index 114b704..f5f16cd 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDataSource.java
@@ -48,7 +48,7 @@ public class PoolingDataSource<C extends Connection> implements DataSource, Auto
 
     /**
      * Constructs a new instance backed by the given connection pool.
-     * 
+     *
      * @param pool
      *            the given connection pool.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
index ab33596..fbf7b9a 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
@@ -223,7 +223,7 @@ public class PoolingDriver implements Driver {
 
     /**
      * PoolGuardConnectionWrapper is a Connection wrapper that makes sure a closed connection cannot be used anymore.
-     * 
+     *
      * @since 2.0
      */
     private class PoolGuardConnectionWrapper extends DelegatingConnection<Connection> {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java b/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
index 3319a92..b9e8f89 100644
--- a/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
+++ b/src/main/java/org/apache/commons/dbcp2/SwallowedExceptionLogger.java
@@ -21,7 +21,7 @@ import org.apache.commons.pool2.SwallowedExceptionListener;
 
 /**
  * Class for logging swallowed exceptions.
- * 
+ *
  * @since 2.0
  */
 public class SwallowedExceptionLogger implements SwallowedExceptionListener {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/411cf622/src/main/java/org/apache/commons/dbcp2/package-info.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/package-info.java b/src/main/java/org/apache/commons/dbcp2/package-info.java
index eddaf06..96c0823 100644
--- a/src/main/java/org/apache/commons/dbcp2/package-info.java
+++ b/src/main/java/org/apache/commons/dbcp2/package-info.java
@@ -95,7 +95,7 @@
  * <p>
  * In code, that might look like this:
  * </p>
- * 
+ *
  * <pre>
  * GenericObjectPool connectionPool = new GenericObjectPool(null);
  * ConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:some:connect:string", "userName",
@@ -109,7 +109,7 @@
  * {@link javax.sql.DataSource} on the last line, we create a {@link org.apache.commons.dbcp2.PoolingDriver}, and
  * register the {@code connectionPool} with it. E.g.,:
  * </p>
- * 
+ *
  * <pre>
  * GenericObjectPool connectionPool = new GenericObjectPool(null);
  * ConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:some:connect:string", "userName",
@@ -124,7 +124,7 @@
  * when it is created, now you can just go to the {@link java.sql.DriverManager} to create your
  * {@link java.sql.Connection}s, like you normally would:
  * </p>
- * 
+ *
  * <pre>
  * Connection conn = DriverManager.getConnection("jdbc:apache:commons:dbcp:example");
  * </pre>


[09/50] [abbrv] commons-dbcp git commit: Line length 120.

Posted by gg...@apache.org.
Line length 120.

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

Branch: refs/heads/release
Commit: cc7f070063cbecf7289918e63150696ede9efeb9
Parents: 6a612f3
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:41:24 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:41:24 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/cc7f0700/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
index 49a20d6..6c4479d 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
@@ -158,8 +158,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl
             throws SQLException {
         getConnectionCalled = true;
         PooledConnectionImpl pooledConnection = null;
-        // Workaround for buggy WebLogic 5.1 classloader - ignore the
-        // exception upon first invocation.
+        // Workaround for buggy WebLogic 5.1 classloader - ignore the exception upon first invocation.
         try {
             if (connectionProperties != null) {
                 update(connectionProperties, KEY_USER, pooledUserName);


[23/50] [abbrv] commons-dbcp git commit: Javadoc.

Posted by gg...@apache.org.
Javadoc.

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

Branch: refs/heads/release
Commit: 738aecefacef32fbf53c5932022a5c4157eb1133
Parents: 0eca91a
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:02:02 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:02:02 2018 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/Constants.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/738aecef/src/main/java/org/apache/commons/dbcp2/Constants.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/Constants.java b/src/main/java/org/apache/commons/dbcp2/Constants.java
index ee25580..36fb0ec 100644
--- a/src/main/java/org/apache/commons/dbcp2/Constants.java
+++ b/src/main/java/org/apache/commons/dbcp2/Constants.java
@@ -17,7 +17,7 @@
 package org.apache.commons.dbcp2;
 
 /**
- * Constants for use with JMX
+ * Constants for use with JMX.
  * 
  * @since 2.0
  */


[29/50] [abbrv] commons-dbcp git commit: Simplify implementation without using the catch NPE hack.

Posted by gg...@apache.org.
Simplify implementation without using the catch NPE hack.

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

Branch: refs/heads/release
Commit: 3df225721c22a5eb7b7b74e774ffe5a0705965d6
Parents: 9eb1e02
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:21:24 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:21:24 2018 -0600

----------------------------------------------------------------------
 src/main/java/org/apache/commons/dbcp2/PoolingDriver.java | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/3df22572/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
index 4272943..2423d19 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
@@ -145,11 +145,7 @@ public class PoolingDriver implements Driver {
 
     @Override
     public boolean acceptsURL(final String url) throws SQLException {
-        try {
-            return url.startsWith(URL_PREFIX);
-        } catch(final NullPointerException e) {
-            return false;
-        }
+        return url == null ? false : url.startsWith(URL_PREFIX);
     }
 
     @Override


[50/50] [abbrv] commons-dbcp git commit: Merge branch 'master' into release.

Posted by gg...@apache.org.
Merge branch 'master' into release.

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

Branch: refs/heads/release
Commit: fb23b1530cfcf68004bf59a6a3e2a68fe79426b1
Parents: f8b2186 8c42fb8
Author: Gary Gregory <ga...@gmail.com>
Authored: Wed Jun 13 11:28:10 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Jun 13 11:28:10 2018 -0600

----------------------------------------------------------------------
 .gitignore                                      |    4 +-
 CONTRIBUTING.md                                 |    2 +-
 README.md                                       |   14 +-
 RELEASE-NOTES.txt                               |   47 +-
 build.properties.sample                         |   58 -
 build.xml                                       |  283 ---
 dbcp-RC.sh                                      |    2 +-
 dbcp-pre-RC.sh                                  |    2 +-
 dbcp-release.sh                                 |    4 +-
 doc/README.txt                                  |    2 +-
 pom.xml                                         |    2 +-
 src/changes/changes.xml                         |   47 +-
 src/changes/release-notes.vm                    |    2 +-
 .../apache/commons/dbcp2/AbandonedTrace.java    |   72 +-
 .../apache/commons/dbcp2/BasicDataSource.java   | 1356 ++++++-------
 .../commons/dbcp2/BasicDataSourceFactory.java   |  248 +--
 .../commons/dbcp2/BasicDataSourceMXBean.java    |   40 +
 .../apache/commons/dbcp2/ConnectionFactory.java |    7 +-
 .../org/apache/commons/dbcp2/Constants.java     |   13 +-
 .../dbcp2/DataSourceConnectionFactory.java      |   64 +-
 .../dbcp2/DelegatingCallableStatement.java      | 1069 ++++++++---
 .../commons/dbcp2/DelegatingConnection.java     |  525 +++---
 .../dbcp2/DelegatingDatabaseMetaData.java       | 1595 ++++++++++------
 .../dbcp2/DelegatingPreparedStatement.java      |  499 +++--
 .../commons/dbcp2/DelegatingResultSet.java      | 1774 +++++++++++++-----
 .../commons/dbcp2/DelegatingStatement.java      |  500 +++--
 .../commons/dbcp2/DriverConnectionFactory.java  |   35 +-
 .../dbcp2/DriverManagerConnectionFactory.java   |   71 +-
 .../dbcp2/LifetimeExceededException.java        |    5 +-
 .../org/apache/commons/dbcp2/ListException.java |   57 +
 .../apache/commons/dbcp2/ObjectNameWrapper.java |    6 +-
 .../java/org/apache/commons/dbcp2/PStmtKey.java |  562 ++++--
 .../dbcp2/PoolableCallableStatement.java        |   68 +-
 .../commons/dbcp2/PoolableConnection.java       |   67 +-
 .../dbcp2/PoolableConnectionFactory.java        |  301 +--
 .../commons/dbcp2/PoolableConnectionMXBean.java |   17 +-
 .../dbcp2/PoolablePreparedStatement.java        |   53 +-
 .../apache/commons/dbcp2/PoolingConnection.java |  738 ++++----
 .../apache/commons/dbcp2/PoolingDataSource.java |  122 +-
 .../org/apache/commons/dbcp2/PoolingDriver.java |  105 +-
 .../commons/dbcp2/SwallowedExceptionLogger.java |   21 +-
 .../java/org/apache/commons/dbcp2/Utils.java    |   91 +-
 .../dbcp2/cpdsadapter/ConnectionImpl.java       |  219 ++-
 .../dbcp2/cpdsadapter/DriverAdapterCPDS.java    |  481 ++---
 .../commons/dbcp2/cpdsadapter/PStmtKeyCPDS.java |   94 +-
 .../dbcp2/cpdsadapter/PooledConnectionImpl.java |  642 ++++---
 .../datasources/CPDSConnectionFactory.java      |  231 +--
 .../datasources/InstanceKeyDataSource.java      |  715 +++----
 .../InstanceKeyDataSourceFactory.java           |  282 ++-
 .../datasources/KeyedCPDSConnectionFactory.java |  205 +-
 .../datasources/PerUserPoolDataSource.java      | 1480 ++++++++-------
 .../PerUserPoolDataSourceFactory.java           |   52 +-
 .../commons/dbcp2/datasources/PoolKey.java      |   54 +-
 .../datasources/PooledConnectionAndInfo.java    |   55 +-
 .../datasources/PooledConnectionManager.java    |   30 +-
 .../dbcp2/datasources/SharedPoolDataSource.java |  137 +-
 .../SharedPoolDataSourceFactory.java            |   12 +-
 .../commons/dbcp2/datasources/UserPassKey.java  |  108 +-
 .../dbcp2/managed/BasicManagedDataSource.java   |   90 +-
 .../managed/DataSourceXAConnectionFactory.java  |  109 +-
 .../dbcp2/managed/LocalXAConnectionFactory.java |  134 +-
 .../dbcp2/managed/ManagedConnection.java        |   75 +-
 .../dbcp2/managed/ManagedDataSource.java        |   46 +-
 .../managed/PoolableManagedConnection.java      |   38 +-
 .../PoolableManagedConnectionFactory.java       |   31 +-
 .../dbcp2/managed/TransactionContext.java       |   85 +-
 .../managed/TransactionContextListener.java     |    8 +-
 .../dbcp2/managed/TransactionRegistry.java      |   63 +-
 .../dbcp2/managed/XAConnectionFactory.java      |   24 +-
 .../org/apache/commons/dbcp2/package-info.java  |  207 +-
 src/site/site.xml                               |    1 +
 src/site/xdoc/configuration.xml                 | 1012 +++++-----
 src/site/xdoc/download_dbcp.xml                 |   26 +-
 src/site/xdoc/guide/classdiagrams.xml           |   58 +-
 src/site/xdoc/guide/index.xml                   |   50 +-
 src/site/xdoc/guide/jndi-howto.xml              |    2 +-
 src/site/xdoc/guide/sequencediagrams.xml        |   52 +-
 src/site/xdoc/index.xml                         |    2 +-
 src/site/xdoc/mail-lists.xml                    |    8 +-
 .../apache/commons/dbcp2/StackMessageLog.java   |    1 -
 .../dbcp2/TestAbandonedBasicDataSource.java     |    6 +-
 .../commons/dbcp2/TestBasicDataSource.java      |    8 +-
 .../dbcp2/TestBasicDataSourceFactory.java       |    6 +-
 .../commons/dbcp2/TestConnectionPool.java       |   13 +-
 .../commons/dbcp2/TestDelegatingConnection.java |    1 -
 .../dbcp2/TestDelegatingPreparedStatement.java  |    2 -
 .../commons/dbcp2/TestDelegatingStatement.java  |    2 -
 .../TestDriverManagerConnectionFactory.java     |   11 +-
 .../java/org/apache/commons/dbcp2/TestJndi.java |   44 +-
 .../org/apache/commons/dbcp2/TestPStmtKey.java  |   84 +
 .../apache/commons/dbcp2/TestPStmtPooling.java  |    2 -
 .../dbcp2/TestPStmtPoolingBasicDataSource.java  |    2 -
 .../commons/dbcp2/TestPoolableConnection.java   |    1 -
 .../commons/dbcp2/TestPoolingDataSource.java    |    7 +-
 .../apache/commons/dbcp2/TestPoolingDriver.java |    8 +-
 .../org/apache/commons/dbcp2/TestUtils.java     |    2 +-
 .../commons/dbcp2/TesterCallableStatement.java  |    2 -
 .../apache/commons/dbcp2/TesterConnection.java  |   13 +-
 .../commons/dbcp2/TesterDatabaseMetaData.java   |   10 +-
 .../org/apache/commons/dbcp2/TesterDriver.java  |   54 +-
 .../commons/dbcp2/TesterPreparedStatement.java  |    5 +-
 .../apache/commons/dbcp2/TesterResultSet.java   |    3 -
 .../apache/commons/dbcp2/TesterStatement.java   |    7 +-
 .../cpdsadapter/TestDriverAdapterCPDS.java      |   17 +-
 .../ConnectionPoolDataSourceProxy.java          |   23 +-
 .../datasources/PooledConnectionProxy.java      |   31 +-
 .../datasources/TestCPDSConnectionFactory.java  |   28 +-
 .../commons/dbcp2/datasources/TestFactory.java  |   11 +-
 .../datasources/TestInstanceKeyDataSource.java  |   12 +-
 .../TestKeyedCPDSConnectionFactory.java         |   14 +-
 .../datasources/TestPerUserPoolDataSource.java  |    4 +-
 .../datasources/TestSharedPoolDataSource.java   |  153 +-
 .../managed/TestBasicManagedDataSource.java     |    2 +-
 .../managed/TestConnectionWithNarayana.java     |  236 +++
 .../dbcp2/managed/TestManagedConnection.java    |    2 +-
 .../dbcp2/managed/TestManagedDataSource.java    |    4 +-
 .../managed/TestManagedDataSourceInTx.java      |    2 -
 .../dbcp2/managed/TestTransactionContext.java   |   10 +-
 118 files changed, 10668 insertions(+), 7643 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/fb23b153/pom.xml
----------------------------------------------------------------------


[31/50] [abbrv] commons-dbcp git commit: Remove trailing white spaces on all lines.

Posted by gg...@apache.org.
Remove trailing white spaces on all lines.

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

Branch: refs/heads/release
Commit: 91dc9948fcd4d6b2c5e5223d6030c4855d337b60
Parents: 16626a9
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 18:43:18 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 18:43:18 2018 -0600

----------------------------------------------------------------------
 .../org/apache/commons/dbcp2/Constants.java     |  2 +-
 .../commons/dbcp2/DelegatingConnection.java     | 10 ++---
 .../commons/dbcp2/DelegatingResultSet.java      |  8 ++--
 .../commons/dbcp2/DriverConnectionFactory.java  |  2 +-
 .../java/org/apache/commons/dbcp2/PStmtKey.java | 46 ++++++++++----------
 .../dbcp2/PoolableConnectionFactory.java        |  2 +-
 .../apache/commons/dbcp2/PoolingConnection.java | 10 ++---
 .../org/apache/commons/dbcp2/PoolingDriver.java |  8 ++--
 .../java/org/apache/commons/dbcp2/Utils.java    |  6 +--
 .../dbcp2/managed/BasicManagedDataSource.java   | 10 ++---
 .../managed/DataSourceXAConnectionFactory.java  |  4 +-
 .../dbcp2/managed/LocalXAConnectionFactory.java |  2 +-
 .../dbcp2/managed/ManagedConnection.java        |  8 ++--
 .../dbcp2/managed/ManagedDataSource.java        |  2 +-
 .../dbcp2/managed/TransactionContext.java       |  4 +-
 .../managed/TransactionContextListener.java     |  2 +-
 .../dbcp2/managed/TransactionRegistry.java      | 10 ++---
 17 files changed, 68 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/Constants.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/Constants.java b/src/main/java/org/apache/commons/dbcp2/Constants.java
index 36fb0ec..4f09839 100644
--- a/src/main/java/org/apache/commons/dbcp2/Constants.java
+++ b/src/main/java/org/apache/commons/dbcp2/Constants.java
@@ -18,7 +18,7 @@ package org.apache.commons.dbcp2;
 
 /**
  * Constants for use with JMX.
- * 
+ *
  * @since 2.0
  */
 public class Constants {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index 08ef8c1..0fbc9ee 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -174,8 +174,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
      * {@code DelegatingConnection}s, and you want to make
      * sure to obtain a "genuine" {@link Connection}.
      * </p>
-     * 
-     * @return innermost delegate. 
+     *
+     * @return innermost delegate.
      */
     public Connection getInnermostDelegate() {
         return getInnermostDelegateInternal();
@@ -186,8 +186,8 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
      * Although this method is public, it is part of the internal API and should
      * not be used by clients. The signature of this method may change at any
      * time including in ways that break backwards compatibility.
-     * 
-     * @return innermost delegate. 
+     *
+     * @return innermost delegate.
      */
     public final Connection getInnermostDelegateInternal() {
         Connection c = connection;
@@ -202,7 +202,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace
 
     /**
      * Sets my delegate.
-     * 
+     *
      * @param connection
      *            my delegate.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
index e50ee25..fbfef78 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingResultSet.java
@@ -106,7 +106,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
 
     /**
      * Wraps the given result set in a delegate.
-     * 
+     *
      * @param statement
      *            The Statement which created the ResultSet.
      * @param resultSet
@@ -122,7 +122,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
 
     /**
      * Wraps the given result set in a delegate.
-     * 
+     *
      * @param connection
      *            The Connection which created the ResultSet.
      * @param resultSet
@@ -138,7 +138,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
 
     /**
      * Gets my delegate.
-     * 
+     *
      * @return my delegate.
      */
     public ResultSet getDelegate() {
@@ -161,7 +161,7 @@ public final class DelegatingResultSet extends AbandonedTrace implements ResultS
      * {@code DelegatingResultSet}s, and you want to make
      * sure to obtain a "genuine" {@link ResultSet}.
      * </p>
-     * 
+     *
      * @return the innermost delegate.
      */
     public ResultSet getInnermostDelegate() {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
index c7d5716..42de432 100644
--- a/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/DriverConnectionFactory.java
@@ -34,7 +34,7 @@ public class DriverConnectionFactory implements ConnectionFactory {
 
     /**
      * Constructs a connection factory for a given Driver.
-     * 
+     *
      * @param driver
      *            The Driver.
      * @param connectString

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
index 6fc5f65..c70c3b6 100644
--- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
+++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
@@ -26,7 +26,7 @@ import org.apache.commons.dbcp2.PoolingConnection.StatementType;
 
 /**
  * A key uniquely identifying {@link java.sql.PreparedStatement PreparedStatement}s.
- * 
+ *
  * @since 2.0
  */
 public class PStmtKey {
@@ -63,7 +63,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      */
@@ -73,7 +73,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -85,7 +85,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -113,7 +113,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -128,7 +128,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -160,7 +160,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -185,7 +185,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -209,7 +209,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param resultSetType
@@ -225,7 +225,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -243,7 +243,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -278,7 +278,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -300,7 +300,7 @@ public class PStmtKey {
 
     /**
      * Constructs a key to uniquely identify a prepared statement.
-     * 
+     *
      * @param sql
      *            The SQL statement.
      * @param catalog
@@ -338,7 +338,7 @@ public class PStmtKey {
 
     /**
      * Gets the SQL statement.
-     * 
+     *
      * @return the SQL statement.
      */
     public String getSql() {
@@ -348,7 +348,7 @@ public class PStmtKey {
     /**
      * Gets the result set type, one of <code>ResultSet.TYPE_FORWARD_ONLY</code>,
      * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>.
-     * 
+     *
      * @return the result set type.
      */
     public Integer getResultSetType() {
@@ -358,7 +358,7 @@ public class PStmtKey {
     /**
      * Gets the result set concurrency type; one of <code>ResultSet.CONCUR_READ_ONLY</code> or
      * <code>ResultSet.CONCUR_UPDATABLE</code>.
-     * 
+     *
      * @return The result set concurrency type.
      */
     public Integer getResultSetConcurrency() {
@@ -368,7 +368,7 @@ public class PStmtKey {
     /**
      * Gets the result set holdability, one of the following <code>ResultSet</code> constants:
      * <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>.
-     * 
+     *
      * @return The result set holdability.
      */
     public Integer getResultSetHoldability() {
@@ -378,7 +378,7 @@ public class PStmtKey {
     /**
      * Gets a flag indicating whether auto-generated keys should be returned; one of
      * <code>Statement.RETURN_GENERATED_KEYS</code> or <code>Statement.NO_GENERATED_KEYS</code>.
-     * 
+     *
      * @return a flag indicating whether auto-generated keys should be returned.
      */
     public Integer getAutoGeneratedKeys() {
@@ -387,7 +387,7 @@ public class PStmtKey {
 
     /**
      * Gets an array of column indexes indicating the columns that should be returned from the inserted row or rows.
-     * 
+     *
      * @return An array of column indexes.
      */
     public int[] getColumnIndexes() {
@@ -396,7 +396,7 @@ public class PStmtKey {
 
     /**
      * Gets an array of column names indicating the columns that should be returned from the inserted row or rows.
-     * 
+     *
      * @return An array of column names.
      */
     public String[] getColumnNames() {
@@ -405,7 +405,7 @@ public class PStmtKey {
 
     /**
      * The catalog.
-     * 
+     *
      * @return The catalog.
      */
     public String getCatalog() {
@@ -414,7 +414,7 @@ public class PStmtKey {
 
     /**
      * The SQL statement type.
-     * 
+     *
      * @return The SQL statement type.
      */
     public StatementType getStmtType() {
@@ -529,7 +529,7 @@ public class PStmtKey {
 
     /**
      * Creates a new Statement from the given Connection.
-     * 
+     *
      * @param connection
      *            The Connection to use to create the statement.
      * @return The statement.

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
index 41d74a5..476b84e 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableConnectionFactory.java
@@ -178,7 +178,7 @@ public class PoolableConnectionFactory implements PooledObjectFactory<PoolableCo
     /**
      * Sets the maximum lifetime in milliseconds of a connection after which the connection will always fail activation,
      * passivation and validation. A value of zero or less indicates an infinite lifetime. The default value is -1.
-     * 
+     *
      * @param maxConnLifetimeMillis
      *            The maximum lifetime in milliseconds.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/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 edf07e1..58c4b32 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingConnection.java
@@ -475,7 +475,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
 
     /**
      * Creates or obtains a {@link PreparedStatement} from the pool.
-     * 
+     *
      * @param sql
      *            the SQL string used to define the PreparedStatement
      * @param columnIndexes
@@ -500,7 +500,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
 
     /**
      * Creates or obtains a {@link PreparedStatement} from the pool.
-     * 
+     *
      * @param sql
      *            the SQL string used to define the PreparedStatement
      * @param resultSetType
@@ -528,7 +528,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
 
     /**
      * Creates or obtains a {@link PreparedStatement} from the pool.
-     * 
+     *
      * @param sql
      *            the SQL string used to define the PreparedStatement
      * @param resultSetType
@@ -558,7 +558,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
 
     /**
      * Creates or obtains a {@link PreparedStatement} from the pool.
-     * 
+     *
      * @param sql
      *            the SQL string used to define the PreparedStatement
      * @param columnNames
@@ -583,7 +583,7 @@ public class PoolingConnection extends DelegatingConnection<Connection>
 
     /**
      * Sets the prepared statement pool.
-     * 
+     *
      * @param pool
      *            the prepared statement pool.
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
index 2423d19..87ff2ba 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolingDriver.java
@@ -82,7 +82,7 @@ public class PoolingDriver implements Driver {
 
     /**
      * Gets the connection pool for the given name.
-     * 
+     *
      * @param name
      *            The pool name
      * @return The pool
@@ -100,7 +100,7 @@ public class PoolingDriver implements Driver {
 
     /**
      * Registers a named pool.
-     * 
+     *
      * @param name
      *            The pool name.
      * @param pool
@@ -113,7 +113,7 @@ public class PoolingDriver implements Driver {
 
     /**
      * Closes a named pool.
-     * 
+     *
      * @param name
      *            The pool name.
      * @throws SQLException
@@ -135,7 +135,7 @@ public class PoolingDriver implements Driver {
 
     /**
      * Gets the pool names.
-     * 
+     *
      * @return the pool names.
      */
     public synchronized String[] getPoolNames(){

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/Utils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/Utils.java b/src/main/java/org/apache/commons/dbcp2/Utils.java
index 059f3d9..8e798c4 100644
--- a/src/main/java/org/apache/commons/dbcp2/Utils.java
+++ b/src/main/java/org/apache/commons/dbcp2/Utils.java
@@ -28,7 +28,7 @@ import java.util.Set;
 
 /**
  * Utility methods.
- * 
+ *
  * @since 2.0
  */
 public final class Utils {
@@ -121,7 +121,7 @@ public final class Utils {
 
     /**
      * Gets the correct i18n message for the given key.
-     * 
+     *
      * @param key
      *            The key to look up an i18n message.
      * @return The i18n message.
@@ -132,7 +132,7 @@ public final class Utils {
 
     /**
      * Gets the correct i18n message for the given key with placeholders replaced by the supplied arguments.
-     * 
+     *
      * @param key
      *            A message key.
      * @param args

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java b/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
index c685134..329c0bd 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/BasicManagedDataSource.java
@@ -91,7 +91,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Gets the required transaction manager property.
-     * 
+     *
      * @return the transaction manager used to enlist connections
      */
     public TransactionManager getTransactionManager() {
@@ -100,7 +100,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Gets the transaction registry.
-     * 
+     *
      * @return the transaction registry associating XAResources with managed connections
      */
     protected synchronized TransactionRegistry getTransactionRegistry() {
@@ -109,7 +109,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Sets the required transaction manager property.
-     * 
+     *
      * @param transactionManager
      *            the transaction manager used to enlist connections
      */
@@ -119,7 +119,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Gets the optional XADataSource class name.
-     * 
+     *
      * @return the optional XADataSource class name
      */
     public synchronized String getXADataSource() {
@@ -128,7 +128,7 @@ public class BasicManagedDataSource extends BasicDataSource {
 
     /**
      * Sets the optional XADataSource class name.
-     * 
+     *
      * @param xaDataSource
      *            the optional XADataSource class name
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
index 7e974e0..661ea62 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/DataSourceXAConnectionFactory.java
@@ -98,7 +98,7 @@ public class DataSourceXAConnectionFactory implements XAConnectionFactory {
 
     /**
      * Gets the user name used to authenticate new connections.
-     * 
+     *
      * @return the user name or null if unauthenticated connections are used
      */
     public String getUsername() {
@@ -107,7 +107,7 @@ public class DataSourceXAConnectionFactory implements XAConnectionFactory {
 
     /**
      * Sets the user name used to authenticate new connections.
-     * 
+     *
      * @param userName
      *            the user name used for authenticating the connection or null for unauthenticated
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
index 00a6992..1eb3c0e 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/LocalXAConnectionFactory.java
@@ -84,7 +84,7 @@ public class LocalXAConnectionFactory implements XAConnectionFactory {
      * </p>
      * It is assumed that the wrapper around a managed connection disables the setAutoCommit(), commit(), rollback() and
      * setReadOnly() methods while a transaction is in progress.
-     * 
+     *
      * @since 2.0
      */
     protected static class LocalXAResource implements XAResource {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
index 91fed32..4906c3a 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/ManagedConnection.java
@@ -45,7 +45,7 @@ import java.util.concurrent.locks.ReentrantLock;
  * @since 2.0
  */
 public class ManagedConnection<C extends Connection> extends DelegatingConnection<C> {
-    
+
     private final ObjectPool<C> pool;
     private final TransactionRegistry transactionRegistry;
     private final boolean accessToUnderlyingConnectionAllowed;
@@ -55,7 +55,7 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
 
     /**
      * Constructs a new instance responsible for managing a database connection in a transactional environment.
-     * 
+     *
      * @param pool
      *            The connection pool.
      * @param transactionRegistry
@@ -195,7 +195,7 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
 
     /**
      * Delegates to {@link ManagedConnection#transactionComplete()} for transaction completion events.
-     * 
+     *
      * @since 2.0
      */
     protected class CompletionListener implements TransactionContextListener {
@@ -279,7 +279,7 @@ public class ManagedConnection<C extends Connection> extends DelegatingConnectio
 
     /**
      * If false, getDelegate() and getInnermostDelegate() will return null.
-     * 
+     *
      * @return if false, getDelegate() and getInnermostDelegate() will return null
      */
     public boolean isAccessToUnderlyingConnectionAllowed() {

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java b/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
index 5e3b784..edd9ae7 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/ManagedDataSource.java
@@ -55,7 +55,7 @@ public class ManagedDataSource<C extends Connection> extends PoolingDataSource<C
     /**
      * Sets the transaction registry from the XAConnectionFactory used to create the pool. The transaction registry can
      * only be set once using either a connector or this setter method.
-     * 
+     *
      * @param transactionRegistry
      *            the transaction registry acquired from the XAConnectionFactory used to create the pool
      */

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
index dfb6ebd..f4065d6 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContext.java
@@ -61,7 +61,7 @@ public class TransactionContext {
     /**
      * Gets the connection shared by all ManagedConnections in the transaction. Specifically, connection using the same
      * XAConnectionFactory from which the TransactionRegistry was obtained.
-     * 
+     *
      * @return the shared connection for this transaction
      */
     public Connection getSharedConnection() {
@@ -133,7 +133,7 @@ public class TransactionContext {
 
     /**
      * True if the transaction is active or marked for rollback only.
-     * 
+     *
      * @return true if the transaction is active or marked for rollback only; false otherwise
      * @throws SQLException
      *             if a problem occurs obtaining the transaction status

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
index 8506d28..cd47079 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionContextListener.java
@@ -25,7 +25,7 @@ package org.apache.commons.dbcp2.managed;
 public interface TransactionContextListener {
     /**
      * Occurs after the transaction commits or rolls back.
-     * 
+     *
      * @param transactionContext
      *            the transaction context that completed
      * @param commited

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/91dc9948/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
index 70aa23c..1cd28c1 100644
--- a/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
+++ b/src/main/java/org/apache/commons/dbcp2/managed/TransactionRegistry.java
@@ -36,7 +36,7 @@ import org.apache.commons.dbcp2.DelegatingConnection;
  * The TransactionRegistry hides the details of transaction processing from the existing DBCP pooling code, and gives
  * the ManagedConnection a way to enlist connections in a transaction, allowing for the maximal rescue of DBCP.
  * </p>
- * 
+ *
  * @since 2.0
  */
 public class TransactionRegistry {
@@ -46,7 +46,7 @@ public class TransactionRegistry {
 
     /**
      * Creates a TransactionRegistry for the specified transaction manager.
-     * 
+     *
      * @param transactionManager
      *            the transaction manager used to enlist connections.
      */
@@ -71,7 +71,7 @@ public class TransactionRegistry {
 
     /**
      * Gets the XAResource registered for the connection.
-     * 
+     *
      * @param connection
      *            the connection
      * @return The XAResource registered for the connection; never null.
@@ -90,7 +90,7 @@ public class TransactionRegistry {
 
     /**
      * Gets the active TransactionContext or null if not Transaction is active.
-     * 
+     *
      * @return The active TransactionContext or null if no Transaction is active.
      * @throws SQLException
      *             Thrown when an error occurs while fetching the transaction.
@@ -124,7 +124,7 @@ public class TransactionRegistry {
 
     /**
      * Unregisters a destroyed connection from {@link TransactionRegistry}.
-     * 
+     *
      * @param connection
      *            A destroyed connection from {@link TransactionRegistry}.
      */


[07/50] [abbrv] commons-dbcp git commit: Better param name.

Posted by gg...@apache.org.
Better param name.

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

Branch: refs/heads/release
Commit: 8e1b54f21160ccfdac07039b05f6a4050114b965
Parents: e7ee948
Author: Gary Gregory <ga...@gmail.com>
Authored: Mon Jun 11 17:39:06 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Mon Jun 11 17:39:06 2018 -0600

----------------------------------------------------------------------
 .../apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/8e1b54f2/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
index 320b4f3..ebda000 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
@@ -561,14 +561,14 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl
     /**
      * Flag to toggle the pooling of <code>PreparedStatement</code>s
      *
-     * @param v
+     * @param poolPreparedStatements
      *            true to pool statements.
      * @throws IllegalStateException
      *             if {@link #getPooledConnection()} has been called
      */
-    public void setPoolPreparedStatements(final boolean v) {
+    public void setPoolPreparedStatements(final boolean poolPreparedStatements) {
         assertInitializationAllowed();
-        this.poolPreparedStatements = v;
+        this.poolPreparedStatements = poolPreparedStatements;
     }
 
     /**