Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java?rev=1729277&r1=1729276&r2=1729277&view=diff ============================================================================== --- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java (original) +++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java Mon Feb 8 21:58:41 2016 @@ -87,7 +87,7 @@ public class DelegatingConnection<C exte * * @param c the {@link Connection} to delegate all calls to. */ - public DelegatingConnection(C c) { + public DelegatingConnection(final C c) { super(); _conn = c; } @@ -152,7 +152,7 @@ public class DelegatingConnection<C exte * @param c connection to compare innermost delegate with * @return true if innermost delegate equals <code>c</code> */ - public boolean innermostDelegateEquals(Connection c) { + public boolean innermostDelegateEquals(final Connection c) { final Connection innerCon = getInnermostDelegateInternal(); if (innerCon == null) { return c == null; @@ -198,7 +198,7 @@ public class DelegatingConnection<C exte } /** Sets my delegate. */ - public void setDelegate(C c) { + public void setDelegate(final C c) { _conn = c; } @@ -223,7 +223,7 @@ public class DelegatingConnection<C exte return _closed; } - protected void setClosedInternal(boolean closed) { + protected void setClosedInternal(final boolean closed) { this._closed = closed; } @@ -243,11 +243,11 @@ public class DelegatingConnection<C exte } } - protected void handleException(SQLException e) throws SQLException { + protected void handleException(final SQLException e) throws SQLException { throw e; } - private void initializeStatement(DelegatingStatement ds) throws SQLException { + private void initializeStatement(final DelegatingStatement ds) throws SQLException { if (defaultQueryTimeout != null && defaultQueryTimeout.intValue() != ds.getQueryTimeout()) { ds.setQueryTimeout(defaultQueryTimeout.intValue()); @@ -270,8 +270,8 @@ public class DelegatingConnection<C exte } @Override - public Statement createStatement(int resultSetType, - int resultSetConcurrency) throws SQLException { + public Statement createStatement(final int resultSetType, + final int resultSetConcurrency) throws SQLException { checkOpen(); try { final DelegatingStatement ds = new DelegatingStatement( @@ -286,7 +286,7 @@ public class DelegatingConnection<C exte } @Override - public PreparedStatement prepareStatement(String sql) throws SQLException { + public PreparedStatement prepareStatement(final String sql) throws SQLException { checkOpen(); try { final DelegatingPreparedStatement dps = new DelegatingPreparedStatement( @@ -301,9 +301,9 @@ public class DelegatingConnection<C exte } @Override - public PreparedStatement prepareStatement(String sql, - int resultSetType, - 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( @@ -318,7 +318,7 @@ public class DelegatingConnection<C exte } @Override - public CallableStatement prepareCall(String sql) throws SQLException { + public CallableStatement prepareCall(final String sql) throws SQLException { checkOpen(); try { final DelegatingCallableStatement dcs = @@ -333,9 +333,9 @@ public class DelegatingConnection<C exte } @Override - public CallableStatement prepareCall(String sql, - int resultSetType, - 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( @@ -474,7 +474,7 @@ public class DelegatingConnection<C exte @Override - public String nativeSQL(String sql) throws SQLException { + public String nativeSQL(final String sql) throws SQLException { checkOpen(); try { return _conn.nativeSQL(sql); @@ -511,7 +511,7 @@ public class DelegatingConnection<C exte * created from this connection. <code>null</code> means that the driver * default will be used. */ - public void setDefaultQueryTimeout(Integer defaultQueryTimeout) { + public void setDefaultQueryTimeout(final Integer defaultQueryTimeout) { this.defaultQueryTimeout = defaultQueryTimeout; } @@ -521,7 +521,7 @@ public class DelegatingConnection<C exte * * @param cacheState The new value for the state caching flag */ - public void setCacheState(boolean cacheState) { + public void setCacheState(final boolean cacheState) { this._cacheState = cacheState; } @@ -538,7 +538,7 @@ public class DelegatingConnection<C exte } @Override - public void setAutoCommit(boolean autoCommit) throws SQLException { + public void setAutoCommit(final boolean autoCommit) throws SQLException { checkOpen(); try { _conn.setAutoCommit(autoCommit); @@ -552,11 +552,11 @@ public class DelegatingConnection<C exte } @Override - public void setCatalog(String catalog) throws SQLException + public void setCatalog(final String catalog) throws SQLException { checkOpen(); try { _conn.setCatalog(catalog); } catch (final SQLException e) { handleException(e); } } @Override - public void setReadOnly(boolean readOnly) throws SQLException { + public void setReadOnly(final boolean readOnly) throws SQLException { checkOpen(); try { _conn.setReadOnly(readOnly); @@ -571,7 +571,7 @@ public class DelegatingConnection<C exte @Override - public void setTransactionIsolation(int level) throws SQLException { + public void setTransactionIsolation(final int level) throws SQLException { checkOpen(); try { _conn.setTransactionIsolation(level); @@ -582,7 +582,7 @@ public class DelegatingConnection<C exte @Override - public void setTypeMap(Map<String,Class<?>> map) throws SQLException { + public void setTypeMap(final Map<String,Class<?>> map) throws SQLException { checkOpen(); try { _conn.setTypeMap(map); @@ -658,7 +658,7 @@ public class DelegatingConnection<C exte @Override - public void setHoldability(int holdability) throws SQLException { + public void setHoldability(final int holdability) throws SQLException { checkOpen(); try { _conn.setHoldability(holdability); @@ -681,7 +681,7 @@ public class DelegatingConnection<C exte @Override - public Savepoint setSavepoint(String name) throws SQLException { + public Savepoint setSavepoint(final String name) throws SQLException { checkOpen(); try { return _conn.setSavepoint(name); @@ -693,7 +693,7 @@ public class DelegatingConnection<C exte @Override - public void rollback(Savepoint savepoint) throws SQLException { + public void rollback(final Savepoint savepoint) throws SQLException { checkOpen(); try { _conn.rollback(savepoint); @@ -704,7 +704,7 @@ public class DelegatingConnection<C exte @Override - public void releaseSavepoint(Savepoint savepoint) + public void releaseSavepoint(final Savepoint savepoint) throws SQLException { checkOpen(); try { @@ -716,9 +716,9 @@ public class DelegatingConnection<C exte @Override - public Statement createStatement(int resultSetType, - int resultSetConcurrency, - 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, @@ -734,9 +734,9 @@ public class DelegatingConnection<C exte } @Override - public PreparedStatement prepareStatement(String sql, int resultSetType, - int resultSetConcurrency, - 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( @@ -752,9 +752,9 @@ public class DelegatingConnection<C exte } @Override - public CallableStatement prepareCall(String sql, int resultSetType, - int resultSetConcurrency, - 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( @@ -770,7 +770,7 @@ public class DelegatingConnection<C exte } @Override - public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { + public PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys) throws SQLException { checkOpen(); try { final DelegatingPreparedStatement dps = new DelegatingPreparedStatement( @@ -785,7 +785,7 @@ public class DelegatingConnection<C exte } @Override - public PreparedStatement prepareStatement(String sql, int columnIndexes[]) throws SQLException { + public PreparedStatement prepareStatement(final String sql, final int columnIndexes[]) throws SQLException { checkOpen(); try { final DelegatingPreparedStatement dps = new DelegatingPreparedStatement( @@ -800,7 +800,7 @@ public class DelegatingConnection<C exte } @Override - public PreparedStatement prepareStatement(String sql, String columnNames[]) throws SQLException { + public PreparedStatement prepareStatement(final String sql, final String columnNames[]) throws SQLException { checkOpen(); try { final DelegatingPreparedStatement dps = new DelegatingPreparedStatement( @@ -816,7 +816,7 @@ public class DelegatingConnection<C exte @Override - public boolean isWrapperFor(Class<?> iface) throws SQLException { + public boolean isWrapperFor(final Class<?> iface) throws SQLException { if (iface.isAssignableFrom(getClass())) { return true; } else if (iface.isAssignableFrom(_conn.getClass())) { @@ -827,7 +827,7 @@ public class DelegatingConnection<C exte } @Override - public <T> T unwrap(Class<T> iface) throws SQLException { + public <T> T unwrap(final Class<T> iface) throws SQLException { if (iface.isAssignableFrom(getClass())) { return iface.cast(this); } else if (iface.isAssignableFrom(_conn.getClass())) { @@ -838,7 +838,7 @@ public class DelegatingConnection<C exte } @Override - public Array createArrayOf(String typeName, Object[] elements) throws SQLException { + public Array createArrayOf(final String typeName, final Object[] elements) throws SQLException { checkOpen(); try { return _conn.createArrayOf(typeName, elements); @@ -898,7 +898,7 @@ public class DelegatingConnection<C exte } @Override - public Struct createStruct(String typeName, Object[] attributes) throws SQLException { + public Struct createStruct(final String typeName, final Object[] attributes) throws SQLException { checkOpen(); try { return _conn.createStruct(typeName, attributes); @@ -910,7 +910,7 @@ public class DelegatingConnection<C exte } @Override - public boolean isValid(int timeout) throws SQLException { + public boolean isValid(final int timeout) throws SQLException { if (isClosed()) { return false; } @@ -924,7 +924,7 @@ public class DelegatingConnection<C exte } @Override - public void setClientInfo(String name, String value) throws SQLClientInfoException { + public void setClientInfo(final String name, final String value) throws SQLClientInfoException { try { checkOpen(); _conn.setClientInfo(name, value); @@ -938,7 +938,7 @@ public class DelegatingConnection<C exte } @Override - public void setClientInfo(Properties properties) throws SQLClientInfoException { + public void setClientInfo(final Properties properties) throws SQLClientInfoException { try { checkOpen(); _conn.setClientInfo(properties); @@ -964,7 +964,7 @@ public class DelegatingConnection<C exte } @Override - public String getClientInfo(String name) throws SQLException { + public String getClientInfo(final String name) throws SQLException { checkOpen(); try { return _conn.getClientInfo(name); @@ -976,7 +976,7 @@ public class DelegatingConnection<C exte } @Override - public void setSchema(String schema) throws SQLException { + public void setSchema(final String schema) throws SQLException { checkOpen(); try { _conn.setSchema(schema); @@ -999,7 +999,7 @@ public class DelegatingConnection<C exte } @Override - public void abort(Executor executor) throws SQLException { + public void abort(final Executor executor) throws SQLException { checkOpen(); try { _conn.abort(executor); @@ -1010,7 +1010,7 @@ public class DelegatingConnection<C exte } @Override - public void setNetworkTimeout(Executor executor, int milliseconds) + public void setNetworkTimeout(final Executor executor, final int milliseconds) throws SQLException { checkOpen(); try {
Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java?rev=1729277&r1=1729276&r2=1729277&view=diff ============================================================================== --- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java (original) +++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java Mon Feb 8 21:58:41 2016 @@ -40,8 +40,8 @@ public class DelegatingDatabaseMetaData /** The connection that created me. **/ private final DelegatingConnection<?> _conn; - public DelegatingDatabaseMetaData(DelegatingConnection<?> c, - DatabaseMetaData m) { + public DelegatingDatabaseMetaData(final DelegatingConnection<?> c, + final DatabaseMetaData m) { super(); _conn = c; _meta = m; @@ -77,7 +77,7 @@ public class DelegatingDatabaseMetaData return m; } - protected void handleException(SQLException e) throws SQLException { + protected void handleException(final SQLException e) throws SQLException { if (_conn != null) { _conn.handleException(e); } @@ -111,7 +111,7 @@ public class DelegatingDatabaseMetaData } @Override - public boolean deletesAreDetected(int type) throws SQLException { + public boolean deletesAreDetected(final int type) throws SQLException { try { return _meta.deletesAreDetected(type); } catch (final SQLException e) { handleException(e); return false; } } @@ -123,8 +123,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getAttributes(String catalog, String schemaPattern, - String typeNamePattern, String attributeNamePattern) + public ResultSet getAttributes(final String catalog, final String schemaPattern, + final String typeNamePattern, final String attributeNamePattern) throws SQLException { _conn.checkOpen(); try { @@ -139,8 +139,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getBestRowIdentifier(String catalog, String schema, - String table, int scope, boolean nullable) throws SQLException { + public ResultSet getBestRowIdentifier(final String catalog, final String schema, + final String table, final int scope, final boolean nullable) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -179,8 +179,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getColumnPrivileges(String catalog, String schema, - String table, String columnNamePattern) throws SQLException { + public ResultSet getColumnPrivileges(final String catalog, final String schema, + final String table, final String columnNamePattern) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -194,8 +194,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getColumns(String catalog, String schemaPattern, - String tableNamePattern, String columnNamePattern) + public ResultSet getColumns(final String catalog, final String schemaPattern, + final String tableNamePattern, final String columnNamePattern) throws SQLException { _conn.checkOpen(); try { @@ -215,9 +215,9 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getCrossReference(String parentCatalog, - String parentSchema, String parentTable, String foreignCatalog, - String foreignSchema, String foreignTable) throws SQLException { + public ResultSet getCrossReference(final String parentCatalog, + final String parentSchema, final String parentTable, final String foreignCatalog, + final String foreignSchema, final String foreignTable) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -280,7 +280,7 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getExportedKeys(String catalog, String schema, String table) + public ResultSet getExportedKeys(final String catalog, final String schema, final String table) throws SQLException { _conn.checkOpen(); try { @@ -306,7 +306,7 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getImportedKeys(String catalog, String schema, String table) + public ResultSet getImportedKeys(final String catalog, final String schema, final String table) throws SQLException { _conn.checkOpen(); try { @@ -320,8 +320,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getIndexInfo(String catalog, String schema, String table, - boolean unique, boolean approximate) throws SQLException { + public ResultSet getIndexInfo(final String catalog, final String schema, final String table, + final boolean unique, final boolean approximate) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -473,7 +473,7 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getPrimaryKeys(String catalog, String schema, String table) + public ResultSet getPrimaryKeys(final String catalog, final String schema, final String table) throws SQLException { _conn.checkOpen(); try { @@ -487,8 +487,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getProcedureColumns(String catalog, String schemaPattern, - String procedureNamePattern, String columnNamePattern) + public ResultSet getProcedureColumns(final String catalog, final String schemaPattern, + final String procedureNamePattern, final String columnNamePattern) throws SQLException { _conn.checkOpen(); try { @@ -509,8 +509,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getProcedures(String catalog, String schemaPattern, - String procedureNamePattern) throws SQLException { + public ResultSet getProcedures(final String catalog, final String schemaPattern, + final String procedureNamePattern) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -573,8 +573,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getSuperTables(String catalog, String schemaPattern, - String tableNamePattern) throws SQLException { + public ResultSet getSuperTables(final String catalog, final String schemaPattern, + final String tableNamePattern) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -588,8 +588,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getSuperTypes(String catalog, String schemaPattern, - String typeNamePattern) throws SQLException { + public ResultSet getSuperTypes(final String catalog, final String schemaPattern, + final String typeNamePattern) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -609,8 +609,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getTablePrivileges(String catalog, String schemaPattern, - String tableNamePattern) throws SQLException { + public ResultSet getTablePrivileges(final String catalog, final String schemaPattern, + final String tableNamePattern) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -637,8 +637,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getTables(String catalog, String schemaPattern, - String tableNamePattern, String[] types) throws SQLException { + public ResultSet getTables(final String catalog, final String schemaPattern, + final String tableNamePattern, final String[] types) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -671,8 +671,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getUDTs(String catalog, String schemaPattern, - String typeNamePattern, int[] types) throws SQLException { + public ResultSet getUDTs(final String catalog, final String schemaPattern, + final String typeNamePattern, final int[] types) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -698,8 +698,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getVersionColumns(String catalog, String schema, - String table) throws SQLException { + public ResultSet getVersionColumns(final String catalog, final String schema, + final String table) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -712,7 +712,7 @@ public class DelegatingDatabaseMetaData } @Override - public boolean insertsAreDetected(int type) throws SQLException { + public boolean insertsAreDetected(final int type) throws SQLException { try { return _meta.insertsAreDetected(type); } catch (final SQLException e) { handleException(e); return false; } } @@ -766,37 +766,37 @@ public class DelegatingDatabaseMetaData } @Override - public boolean othersDeletesAreVisible(int type) throws SQLException { + public boolean othersDeletesAreVisible(final int type) throws SQLException { try { return _meta.othersDeletesAreVisible(type); } catch (final SQLException e) { handleException(e); return false; } } @Override - public boolean othersInsertsAreVisible(int type) throws SQLException { + public boolean othersInsertsAreVisible(final int type) throws SQLException { try { return _meta.othersInsertsAreVisible(type); } catch (final SQLException e) { handleException(e); return false; } } @Override - public boolean othersUpdatesAreVisible(int type) throws SQLException { + public boolean othersUpdatesAreVisible(final int type) throws SQLException { try { return _meta.othersUpdatesAreVisible(type); } catch (final SQLException e) { handleException(e); return false; } } @Override - public boolean ownDeletesAreVisible(int type) throws SQLException { + public boolean ownDeletesAreVisible(final int type) throws SQLException { try { return _meta.ownDeletesAreVisible(type); } catch (final SQLException e) { handleException(e); return false; } } @Override - public boolean ownInsertsAreVisible(int type) throws SQLException { + public boolean ownInsertsAreVisible(final int type) throws SQLException { try { return _meta.ownInsertsAreVisible(type); } catch (final SQLException e) { handleException(e); return false; } } @Override - public boolean ownUpdatesAreVisible(int type) throws SQLException { + public boolean ownUpdatesAreVisible(final int type) throws SQLException { try { return _meta.ownUpdatesAreVisible(type); } catch (final SQLException e) { handleException(e); return false; } } @@ -916,7 +916,7 @@ public class DelegatingDatabaseMetaData } @Override - public boolean supportsConvert(int fromType, int toType) + public boolean supportsConvert(final int fromType, final int toType) throws SQLException { try { return _meta.supportsConvert(fromType, toType); } catch (final SQLException e) { handleException(e); return false; } @@ -1111,21 +1111,21 @@ public class DelegatingDatabaseMetaData } @Override - public boolean supportsResultSetConcurrency(int type, int concurrency) + public boolean supportsResultSetConcurrency(final int type, final int concurrency) throws SQLException { try { return _meta.supportsResultSetConcurrency(type, concurrency); } catch (final SQLException e) { handleException(e); return false; } } @Override - public boolean supportsResultSetHoldability(int holdability) + public boolean supportsResultSetHoldability(final int holdability) throws SQLException { try { return _meta.supportsResultSetHoldability(holdability); } catch (final SQLException e) { handleException(e); return false; } } @Override - public boolean supportsResultSetType(int type) throws SQLException { + public boolean supportsResultSetType(final int type) throws SQLException { try { return _meta.supportsResultSetType(type); } catch (final SQLException e) { handleException(e); return false; } } @@ -1215,7 +1215,7 @@ public class DelegatingDatabaseMetaData } @Override - public boolean supportsTransactionIsolationLevel(int level) + public boolean supportsTransactionIsolationLevel(final int level) throws SQLException { try { return _meta.supportsTransactionIsolationLevel(level); } catch (final SQLException e) { handleException(e); return false; } @@ -1240,7 +1240,7 @@ public class DelegatingDatabaseMetaData } @Override - public boolean updatesAreDetected(int type) throws SQLException { + public boolean updatesAreDetected(final int type) throws SQLException { try { return _meta.updatesAreDetected(type); } catch (final SQLException e) { handleException(e); return false; } } @@ -1260,7 +1260,7 @@ public class DelegatingDatabaseMetaData /* JDBC_4_ANT_KEY_BEGIN */ @Override - public boolean isWrapperFor(Class<?> iface) throws SQLException { + public boolean isWrapperFor(final Class<?> iface) throws SQLException { if (iface.isAssignableFrom(getClass())) { return true; } else if (iface.isAssignableFrom(_meta.getClass())) { @@ -1271,7 +1271,7 @@ public class DelegatingDatabaseMetaData } @Override - public <T> T unwrap(Class<T> iface) throws SQLException { + public <T> T unwrap(final Class<T> iface) throws SQLException { if (iface.isAssignableFrom(getClass())) { return iface.cast(this); } else if (iface.isAssignableFrom(_meta.getClass())) { @@ -1288,7 +1288,7 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getSchemas(String catalog, String schemaPattern) + public ResultSet getSchemas(final String catalog, final String schemaPattern) throws SQLException { _conn.checkOpen(); try { @@ -1327,8 +1327,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getFunctions(String catalog, String schemaPattern, - String functionNamePattern) throws SQLException { + public ResultSet getFunctions(final String catalog, final String schemaPattern, + final String functionNamePattern) throws SQLException { _conn.checkOpen(); try { return DelegatingResultSet.wrapResultSet(_conn, @@ -1342,8 +1342,8 @@ public class DelegatingDatabaseMetaData } @Override - public ResultSet getFunctionColumns(String catalog, String schemaPattern, - String functionNamePattern, String columnNamePattern) + public ResultSet getFunctionColumns(final String catalog, final String schemaPattern, + final String functionNamePattern, final String columnNamePattern) throws SQLException { _conn.checkOpen(); try { @@ -1360,8 +1360,8 @@ public class DelegatingDatabaseMetaData /* JDBC_4_ANT_KEY_END */ @Override - public ResultSet getPseudoColumns(String catalog, String schemaPattern, - String tableNamePattern, String columnNamePattern) + public ResultSet getPseudoColumns(final String catalog, final String schemaPattern, + final String tableNamePattern, final String columnNamePattern) throws SQLException { _conn.checkOpen(); try { Modified: commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java?rev=1729277&r1=1729276&r2=1729277&view=diff ============================================================================== --- commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java (original) +++ commons/proper/dbcp/trunk/src/main/java/org/apache/commons/dbcp2/DelegatingPreparedStatement.java Mon Feb 8 21:58:41 2016 @@ -68,8 +68,8 @@ public class DelegatingPreparedStatement * @param s the {@link PreparedStatement} to delegate all calls to. * @param c the {@link DelegatingConnection} that created this statement. */ - public DelegatingPreparedStatement(DelegatingConnection<?> c, - PreparedStatement s) { + public DelegatingPreparedStatement(final DelegatingConnection<?> c, + final PreparedStatement s) { super(c, s); } @@ -103,73 +103,73 @@ public class DelegatingPreparedStatement } @Override - public void setNull(int parameterIndex, int sqlType) throws SQLException + public void setNull(final int parameterIndex, final int sqlType) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNull(parameterIndex,sqlType); } catch (final SQLException e) { handleException(e); } } @Override - public void setBoolean(int parameterIndex, boolean x) throws SQLException + public void setBoolean(final int parameterIndex, final boolean x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBoolean(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setByte(int parameterIndex, byte x) throws SQLException + public void setByte(final int parameterIndex, final byte x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setByte(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setShort(int parameterIndex, short x) throws SQLException + public void setShort(final int parameterIndex, final short x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setShort(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setInt(int parameterIndex, int x) throws SQLException + public void setInt(final int parameterIndex, final int x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setInt(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setLong(int parameterIndex, long x) throws SQLException + public void setLong(final int parameterIndex, final long x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setLong(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setFloat(int parameterIndex, float x) throws SQLException + public void setFloat(final int parameterIndex, final float x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setFloat(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setDouble(int parameterIndex, double x) throws SQLException + public void setDouble(final int parameterIndex, final double x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setDouble(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException + public void setBigDecimal(final int parameterIndex, final BigDecimal x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBigDecimal(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setString(int parameterIndex, String x) throws SQLException + public void setString(final int parameterIndex, final String x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setString(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setBytes(int parameterIndex, byte[] x) throws SQLException + public void setBytes(final int parameterIndex, final byte[] x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBytes(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setDate(int parameterIndex, Date x) throws SQLException + public void setDate(final int parameterIndex, final Date x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setDate(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setTime(int parameterIndex, Time x) throws SQLException + public void setTime(final int parameterIndex, final Time x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setTime(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException + public void setTimestamp(final int parameterIndex, final Timestamp x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setTimestamp(parameterIndex,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException + public void setAsciiStream(final int parameterIndex, final InputStream x, final int length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setAsciiStream(parameterIndex,x,length); } catch (final SQLException e) { handleException(e); } } /** @deprecated Use setAsciiStream(), setCharacterStream() or setNCharacterStream() */ @Deprecated @Override - public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException + public void setUnicodeStream(final int parameterIndex, final InputStream x, final int length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setUnicodeStream(parameterIndex,x,length); } catch (final SQLException e) { handleException(e); } } @Override - public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException + public void setBinaryStream(final int parameterIndex, final InputStream x, final int length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBinaryStream(parameterIndex,x,length); } catch (final SQLException e) { handleException(e); } } @Override @@ -177,15 +177,15 @@ public class DelegatingPreparedStatement { checkOpen(); try { ((PreparedStatement)getDelegate()).clearParameters(); } catch (final SQLException e) { handleException(e); } } @Override - public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException + public void setObject(final int parameterIndex, final Object x, final int targetSqlType, final int scale) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setObject(parameterIndex, x, targetSqlType, scale); } catch (final SQLException e) { handleException(e); } } @Override - public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException + public void setObject(final int parameterIndex, final Object x, final int targetSqlType) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setObject(parameterIndex, x, targetSqlType); } catch (final SQLException e) { handleException(e); } } @Override - public void setObject(int parameterIndex, Object x) throws SQLException + public void setObject(final int parameterIndex, final Object x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setObject(parameterIndex, x); } catch (final SQLException e) { handleException(e); } } @Override @@ -207,23 +207,23 @@ public class DelegatingPreparedStatement { checkOpen(); try { ((PreparedStatement)getDelegate()).addBatch(); } catch (final SQLException e) { handleException(e); } } @Override - public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException + public void setCharacterStream(final int parameterIndex, final Reader reader, final int length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setCharacterStream(parameterIndex,reader,length); } catch (final SQLException e) { handleException(e); } } @Override - public void setRef(int i, Ref x) throws SQLException + public void setRef(final int i, final Ref x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setRef(i,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setBlob(int i, Blob x) throws SQLException + public void setBlob(final int i, final Blob x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBlob(i,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setClob(int i, Clob x) throws SQLException + public void setClob(final int i, final Clob x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setClob(i,x); } catch (final SQLException e) { handleException(e); } } @Override - public void setArray(int i, Array x) throws SQLException + public void setArray(final int i, final Array x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setArray(i,x); } catch (final SQLException e) { handleException(e); } } @Override @@ -231,19 +231,19 @@ public class DelegatingPreparedStatement { checkOpen(); try { return ((PreparedStatement)getDelegate()).getMetaData(); } catch (final SQLException e) { handleException(e); throw new AssertionError(); } } @Override - public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException + public void setDate(final int parameterIndex, final Date x, final Calendar cal) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setDate(parameterIndex,x,cal); } catch (final SQLException e) { handleException(e); } } @Override - public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException + public void setTime(final int parameterIndex, final Time x, final Calendar cal) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setTime(parameterIndex,x,cal); } catch (final SQLException e) { handleException(e); } } @Override - public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException + public void setTimestamp(final int parameterIndex, final Timestamp x, final Calendar cal) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setTimestamp(parameterIndex,x,cal); } catch (final SQLException e) { handleException(e); } } @Override - public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException + public void setNull(final int paramIndex, final int sqlType, final String typeName) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNull(paramIndex,sqlType,typeName); } catch (final SQLException e) { handleException(e); } } /** @@ -258,7 +258,7 @@ public class DelegatingPreparedStatement } @Override - public void setURL(int parameterIndex, java.net.URL x) throws SQLException + public void setURL(final int parameterIndex, final java.net.URL x) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setURL(parameterIndex, x); } catch (final SQLException e) { handleException(e); } } @Override @@ -267,7 +267,7 @@ public class DelegatingPreparedStatement @Override - public void setRowId(int parameterIndex, RowId value) throws SQLException { + public void setRowId(final int parameterIndex, final RowId value) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setRowId(parameterIndex, value); @@ -278,7 +278,7 @@ public class DelegatingPreparedStatement } @Override - public void setNString(int parameterIndex, String value) throws SQLException { + public void setNString(final int parameterIndex, final String value) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNString(parameterIndex, value); @@ -289,7 +289,7 @@ public class DelegatingPreparedStatement } @Override - public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException { + public void setNCharacterStream(final int parameterIndex, final Reader value, final long length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNCharacterStream(parameterIndex, value, length); @@ -300,7 +300,7 @@ public class DelegatingPreparedStatement } @Override - public void setNClob(int parameterIndex, NClob value) throws SQLException { + public void setNClob(final int parameterIndex, final NClob value) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNClob(parameterIndex, value); @@ -311,7 +311,7 @@ public class DelegatingPreparedStatement } @Override - public void setClob(int parameterIndex, Reader reader, long length) throws SQLException { + public void setClob(final int parameterIndex, final Reader reader, final long length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setClob(parameterIndex, reader, length); @@ -322,7 +322,7 @@ public class DelegatingPreparedStatement } @Override - public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException { + public void setBlob(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBlob(parameterIndex, inputStream, length); @@ -333,7 +333,7 @@ public class DelegatingPreparedStatement } @Override - public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException { + public void setNClob(final int parameterIndex, final Reader reader, final long length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNClob(parameterIndex, reader, length); @@ -344,7 +344,7 @@ public class DelegatingPreparedStatement } @Override - public void setSQLXML(int parameterIndex, SQLXML value) throws SQLException { + public void setSQLXML(final int parameterIndex, final SQLXML value) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setSQLXML(parameterIndex, value); @@ -355,7 +355,7 @@ public class DelegatingPreparedStatement } @Override - public void setAsciiStream(int parameterIndex, InputStream inputStream, long length) throws SQLException { + public void setAsciiStream(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setAsciiStream(parameterIndex, inputStream, length); @@ -366,7 +366,7 @@ public class DelegatingPreparedStatement } @Override - public void setBinaryStream(int parameterIndex, InputStream inputStream, long length) throws SQLException { + public void setBinaryStream(final int parameterIndex, final InputStream inputStream, final long length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBinaryStream(parameterIndex, inputStream, length); @@ -377,7 +377,7 @@ public class DelegatingPreparedStatement } @Override - public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException { + public void setCharacterStream(final int parameterIndex, final Reader reader, final long length) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setCharacterStream(parameterIndex, reader, length); @@ -388,7 +388,7 @@ public class DelegatingPreparedStatement } @Override - public void setAsciiStream(int parameterIndex, InputStream inputStream) throws SQLException { + public void setAsciiStream(final int parameterIndex, final InputStream inputStream) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setAsciiStream(parameterIndex, inputStream); @@ -399,7 +399,7 @@ public class DelegatingPreparedStatement } @Override - public void setBinaryStream(int parameterIndex, InputStream inputStream) throws SQLException { + public void setBinaryStream(final int parameterIndex, final InputStream inputStream) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBinaryStream(parameterIndex, inputStream); @@ -410,7 +410,7 @@ public class DelegatingPreparedStatement } @Override - public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException { + public void setCharacterStream(final int parameterIndex, final Reader reader) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setCharacterStream(parameterIndex, reader); @@ -421,7 +421,7 @@ public class DelegatingPreparedStatement } @Override - public void setNCharacterStream(int parameterIndex, Reader reader) throws SQLException { + public void setNCharacterStream(final int parameterIndex, final Reader reader) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNCharacterStream(parameterIndex, reader); @@ -432,7 +432,7 @@ public class DelegatingPreparedStatement } @Override - public void setClob(int parameterIndex, Reader reader) throws SQLException { + public void setClob(final int parameterIndex, final Reader reader) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setClob(parameterIndex, reader); @@ -443,7 +443,7 @@ public class DelegatingPreparedStatement } @Override - public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException { + public void setBlob(final int parameterIndex, final InputStream inputStream) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setBlob(parameterIndex, inputStream); @@ -454,7 +454,7 @@ public class DelegatingPreparedStatement } @Override - public void setNClob(int parameterIndex, Reader reader) throws SQLException { + public void setNClob(final int parameterIndex, final Reader reader) throws SQLException { checkOpen(); try { ((PreparedStatement)getDelegate()).setNClob(parameterIndex, reader);