On 1/10/13 8:57 AM, ma...@apache.org wrote:
> Author: markt
> Date: Thu Jan 10 16:57:07 2013
> New Revision: 1431496
>
> URL: http://svn.apache.org/viewvc?rev=1431496&view=rev
> Log:
> Update DBCP2 to require JDBC 4.1 (Java 7) since Java 6 is close to end of 
> life and a DBCP2 release is still a little way off.

Probably should have talked about this on the list.  Oh, I guess we
are.  In that case, here is my +1.

Thanks!

Phil
>
> Modified:
>     commons/proper/dbcp/trunk/build.xml
>     commons/proper/dbcp/trunk/pom.xml
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
>     
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
>     
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java
>     
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java
>     
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java
>     
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java
>     
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java
>     
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java
>     
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java
>
> Modified: commons/proper/dbcp/trunk/build.xml
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/build.xml?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/build.xml (original)
> +++ commons/proper/dbcp/trunk/build.xml Thu Jan 10 16:57:07 2013
> @@ -57,7 +57,7 @@
>         <property name="src.dir" value="${basedir}/src"/>
>         <property name="src.java.dir" value="${src.dir}/java"/>
>         <property name="src.test.dir" value="${src.dir}/test"/>
> -       <property name="javac.source" value="1.5" />
> +       <property name="javac.source" value="1.7" />
>  
>        <property name="test.failonerror" value="true" /> 
>        <property name="test.runner" value="junit.textui.TestRunner" /> 
> @@ -144,7 +144,7 @@
>                 nohelp="true"
>                 nonavbar="false"
>                 serialwarn="false">
> -          <link href="http://java.sun.com/j2se/1.5.0/docs/api"/>
> +          <link href="http://docs.oracle.com/javase/7/docs/api/"/>
>            <link href="http://commons.apache.org/pool/apidocs"/>
>        </javadoc>
>     </target>
>
> Modified: commons/proper/dbcp/trunk/pom.xml
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/pom.xml?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- commons/proper/dbcp/trunk/pom.xml (original)
> +++ commons/proper/dbcp/trunk/pom.xml Thu Jan 10 16:57:07 2013
> @@ -204,13 +204,11 @@
>    </dependencies>
>  
>    <properties>
> -    <maven.compile.source>1.6</maven.compile.source>
> -    <maven.compile.target>1.6</maven.compile.target>
> +    <maven.compile.source>1.7</maven.compile.source>
> +    <maven.compile.target>1.7</maven.compile.target>
>      <commons.componentid>dbcp</commons.componentid>
> -    <commons.release.version>1.4</commons.release.version>
> -    <commons.release.desc>for JDBC 4 (JDK 1.6)</commons.release.desc>
> -    <commons.release.2.version>1.3</commons.release.2.version>
> -    <commons.release.2.desc>for JDBC 3 (JDK 1.4-1.5)</commons.release.2.desc>
> +    <commons.release.version>2.0</commons.release.version>
> +    <commons.release.desc>for JDBC 4.1 (JDK 1.7)</commons.release.desc>
>      <commons.jira.id>DBCP</commons.jira.id>
>      <commons.jira.pid>12310469</commons.jira.pid>
>    </properties> 
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/BasicDataSource.java
>  Thu Jan 10 16:57:07 2013
> @@ -24,10 +24,13 @@ import java.util.List;
>  import java.util.ArrayList;
>  import java.util.Iterator;
>  import java.util.Collections;
> +import java.util.logging.Logger;
>  import java.sql.Connection;
>  import java.sql.Driver;
>  import java.sql.DriverManager;
>  import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> +
>  import javax.sql.DataSource;
>  
>  import org.apache.commons.pool2.impl.GenericKeyedObjectPoolConfig;
> @@ -1492,6 +1495,10 @@ public class BasicDataSource implements 
>      }
>      /* JDBC_4_ANT_KEY_END */
>  
> +    @Override
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        throw new SQLFeatureNotSupportedException();
> +    }
>          
>      // ------------------------------------------------------ Protected 
> Methods
>  
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingCallableStatement.java
>  Thu Jan 10 16:57:07 2013
> @@ -752,7 +752,8 @@ public class DelegatingCallableStatement
>          }
>          catch (SQLException e) {
>              handleException(e);
> -        }    }
> +        }
> +    }
>  
>      @Override
>      public void setBlob(String parameterName, InputStream inputStream) 
> throws SQLException {
> @@ -762,7 +763,8 @@ public class DelegatingCallableStatement
>          }
>          catch (SQLException e) {
>              handleException(e);
> -        }    }
> +        }
> +    }
>  
>      @Override
>      public void setNClob(String parameterName, Reader reader) throws 
> SQLException {
> @@ -775,4 +777,32 @@ public class DelegatingCallableStatement
>          }
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public <T> T getObject(int parameterIndex, Class<T> type)
> +            throws SQLException {
> +        checkOpen();
> +        try {
> +            return ((CallableStatement)_stmt).getObject(parameterIndex, 
> type);
> +}
> +        catch (SQLException e) {
> +            handleException(e);
> +            return null;
> +        }
> +    }
> +
> +    @Override
> +    public <T> T getObject(String parameterName, Class<T> type)
> +            throws SQLException {
> +        checkOpen();
> +        try {
> +            return ((CallableStatement)_stmt).getObject(parameterName, type);
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +            return null;
> +        }
> +    }
> +
> +
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingConnection.java
>  Thu Jan 10 16:57:07 2013
> @@ -40,6 +40,7 @@ import java.sql.Struct;
>  import java.util.Collections;
>  import java.util.Properties;
>  /* JDBC_4_ANT_KEY_END */
> +import java.util.concurrent.Executor;
>  
>  /**
>   * A base delegating implementation of {@link Connection}.
> @@ -805,4 +806,62 @@ public class DelegatingConnection extend
>          }
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public void setSchema(String schema) throws SQLException {
> +        checkOpen();
> +        try {
> +            _conn.setSchema(schema);
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +        }
> +    }
> +
> +    @Override
> +    public String getSchema() throws SQLException {
> +        checkOpen();
> +        try {
> +            return _conn.getSchema();
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +            return null;
> +        }
> +    }
> +
> +    @Override
> +    public void abort(Executor executor) throws SQLException {
> +        checkOpen();
> +        try {
> +            _conn.abort(executor);
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +        }
> +    }
> +
> +    @Override
> +    public void setNetworkTimeout(Executor executor, int milliseconds)
> +            throws SQLException {
> +        checkOpen();
> +        try {
> +            _conn.setNetworkTimeout(executor, milliseconds);
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +        }
> +    }
> +
> +    @Override
> +    public int getNetworkTimeout() throws SQLException {
> +        checkOpen();
> +        try {
> +            return _conn.getNetworkTimeout();
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +            return 0;
> +        }
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingDatabaseMetaData.java
>  Thu Jan 10 16:57:07 2013
> @@ -1379,4 +1379,31 @@ public class DelegatingDatabaseMetaData 
>  
>      /* JDBC_4_ANT_KEY_END */
>  
> +    @Override
> +    public ResultSet getPseudoColumns(String catalog, String schemaPattern,
> +            String tableNamePattern, String columnNamePattern)
> +            throws SQLException {
> +        _conn.checkOpen();
> +        try {
> +            return DelegatingResultSet.wrapResultSet(_conn,
> +                    _meta.getPseudoColumns(catalog, schemaPattern,
> +                            tableNamePattern, columnNamePattern));
> +}
> +        catch (SQLException e) {
> +            handleException(e);
> +            throw new AssertionError();
> +        }
> +    }
> +
> +    @Override
> +    public boolean generatedKeyAlwaysReturned() throws SQLException {
> +        _conn.checkOpen();
> +        try {
> +            return _meta.generatedKeyAlwaysReturned();
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +            return false;
> +        }
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingResultSet.java
>  Thu Jan 10 16:57:07 2013
> @@ -1275,4 +1275,27 @@ public class DelegatingResultSet extends
>          }
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public <T> T getObject(int columnIndex, Class<T> type) throws 
> SQLException {
> +        try {
> +            return _res.getObject(columnIndex, type);
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +            return null;
> +        }
> +    }
> +
> +    @Override
> +    public <T> T getObject(String columnLabel, Class<T> type)
> +            throws SQLException {
> +        try {
> +            return _res.getObject(columnLabel, type);
> +        }
> +        catch (SQLException e) {
> +            handleException(e);
> +            return null;
> +        }
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/DelegatingStatement.java
>  Thu Jan 10 16:57:07 2013
> @@ -530,4 +530,25 @@ public class DelegatingStatement extends
>          }
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public void closeOnCompletion() throws SQLException {
> +        checkOpen();
> +        try {
> +            _stmt.closeOnCompletion();
> +        } catch (SQLException e) {
> +            handleException(e);
> +        }
> +    }
> +
> +    @Override
> +    public boolean isCloseOnCompletion() throws SQLException {
> +        checkOpen();
> +        try {
> +            return _stmt.isCloseOnCompletion();
> +        } catch (SQLException e) {
> +            handleException(e);
> +            return false;
> +        }
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDataSource.java
>  Thu Jan 10 16:57:07 2013
> @@ -23,10 +23,12 @@ import java.sql.Connection;
>  import java.sql.DatabaseMetaData;
>  import java.sql.PreparedStatement;
>  import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
>  import java.sql.SQLWarning;
>  import java.sql.Statement;
>  import java.util.Map;
>  import java.util.NoSuchElementException;
> +import java.util.logging.Logger;
>  
>  import javax.sql.DataSource;
>  
> @@ -98,6 +100,11 @@ public class PoolingDataSource implement
>      }
>      /* JDBC_4_ANT_KEY_END */
>      
> +    @Override
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        throw new SQLFeatureNotSupportedException();
> +    }
> +
>      //--- DataSource methods -----------------------------------------
>  
>      /**
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/PoolingDriver.java
>  Thu Jan 10 16:57:07 2013
> @@ -25,6 +25,7 @@ import java.sql.DriverManager;
>  import java.sql.DriverPropertyInfo;
>  import java.sql.PreparedStatement;
>  import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
>  import java.sql.SQLWarning;
>  import java.sql.Statement;
>  import java.util.HashMap;
> @@ -32,6 +33,7 @@ import java.util.Map;
>  import java.util.NoSuchElementException;
>  import java.util.Properties;
>  import java.util.Set;
> +import java.util.logging.Logger;
>  
>  import org.apache.commons.pool2.ObjectPool;
>  
> @@ -154,6 +156,11 @@ public class PoolingDriver implements Dr
>          }
>      }
>  
> +    @Override
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        throw new SQLFeatureNotSupportedException();
> +    }
> +
>      /**
>       * Invalidates the given connection.
>       * 
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
>  Thu Jan 10 16:57:07 2013
> @@ -19,10 +19,13 @@ package org.apache.commons.dbcp2.cpdsada
>  
>  import java.util.Hashtable;
>  import java.util.Properties;
> +import java.util.logging.Logger;
>  import java.io.PrintWriter;
>  import java.io.Serializable;
>  import java.sql.DriverManager;
>  import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> +
>  import javax.sql.PooledConnection;
>  import javax.sql.ConnectionPoolDataSource;
>  import javax.naming.Name;
> @@ -220,6 +223,11 @@ public class DriverAdapterCPDS
>          return pci;
>      }
>  
> +    @Override
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        throw new SQLFeatureNotSupportedException();
> +    }
> +
>      // ----------------------------------------------------------------------
>      // Referenceable implementation 
>  
>
> Modified: 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
>  Thu Jan 10 16:57:07 2013
> @@ -21,8 +21,10 @@ import java.io.Serializable;
>  import java.io.PrintWriter;
>  import java.sql.Connection;
>  import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
>  import java.util.NoSuchElementException;
>  import java.util.Properties;
> +import java.util.logging.Logger;
>  
>  import javax.naming.Context;
>  import javax.naming.InitialContext;
> @@ -181,6 +183,11 @@ public abstract class InstanceKeyDataSou
>      }
>      /* JDBC_4_ANT_KEY_END */
>  
> +    @Override
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        throw new SQLFeatureNotSupportedException();
> +    }
> +
>      // -------------------------------------------------------------------
>      // Properties
>  
>
> Modified: 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterCallableStatement.java
>  Thu Jan 10 16:57:07 2013
> @@ -152,7 +152,7 @@ public class TesterCallableStatement ext
>      }
>  
>      @Override
> -    public Object getObject(int i, Map map) throws SQLException {
> +    public Object getObject(int i, Map<String, Class<?>> map) throws 
> SQLException {
>          return null;
>      }
>  
> @@ -383,7 +383,7 @@ public class TesterCallableStatement ext
>      }
>  
>      @Override
> -    public Object getObject(String parameterName, Map map) throws 
> SQLException {
> +    public Object getObject(String parameterName, Map<String,Class<?>> map) 
> throws SQLException {
>          return null;
>      }
>  
> @@ -568,4 +568,14 @@ public class TesterCallableStatement ext
>      public void setNClob(String parameterName, Reader reader) throws 
> SQLException {
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public <T> T getObject(int parameterIndex, Class<T> type) throws 
> SQLException {
> +        return null;
> +    }
> +
> +    @Override
> +    public <T> T getObject(String parameterName, Class<T> type) throws 
> SQLException {
> +        return null;
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterConnection.java
>  Thu Jan 10 16:57:07 2013
> @@ -35,6 +35,7 @@ import java.sql.SQLXML;
>  import java.sql.Struct;
>  import java.util.Properties;
>  /* JDBC_4_ANT_KEY_END */
> +import java.util.concurrent.Executor;
>  
>  /**
>   * A dummy {@link Connection}, for testing purposes.
> @@ -49,7 +50,7 @@ public class TesterConnection implements
>      protected int _transactionIsolation = 1;
>      protected DatabaseMetaData _metaData = new TesterDatabaseMetaData();
>      protected String _catalog = null;
> -    protected Map _typeMap = null;
> +    protected Map<String,Class<?>> _typeMap = null;
>      protected boolean _readOnly = false;
>      protected SQLWarning warnings = null;
>      protected String username = null;
> @@ -126,7 +127,7 @@ public class TesterConnection implements
>      }
>  
>      @Override
> -    public Map getTypeMap() throws SQLException {
> +    public Map<String,Class<?>> getTypeMap() throws SQLException {
>          checkOpen();
>          return _typeMap;
>      }
> @@ -222,7 +223,7 @@ public class TesterConnection implements
>      }
>  
>      @Override
> -    public void setTypeMap(Map map) throws SQLException {
> +    public void setTypeMap(Map<String,Class<?>> map) throws SQLException {
>          checkOpen();
>          _typeMap = map;
>      }
> @@ -383,4 +384,30 @@ public class TesterConnection implements
>          throw new SQLException("Not implemented.");
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public void setSchema(String schema) throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
> +
> +    @Override
> +    public String getSchema() throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
> +
> +    @Override
> +    public void abort(Executor executor) throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
> +
> +    @Override
> +    public void setNetworkTimeout(Executor executor, int milliseconds)
> +            throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
> +
> +    @Override
> +    public int getNetworkTimeout() throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDatabaseMetaData.java
>  Thu Jan 10 16:57:07 2013
> @@ -935,4 +935,16 @@ public class TesterDatabaseMetaData impl
>      }
>  
>      /* JDBC_4_ANT_KEY_END */
> +    
> +    @Override
> +    public ResultSet getPseudoColumns(String catalog, String schemaPattern,
> +            String tableNamePattern, String columnNamePattern)
> +            throws SQLException {
> +        return null;
> +    }
> +
> +    @Override
> +    public boolean generatedKeyAlwaysReturned() throws SQLException {
> +        return false;
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java 
> (original)
> +++ 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterDriver.java 
> Thu Jan 10 16:57:07 2013
> @@ -22,7 +22,9 @@ import java.sql.Driver;
>  import java.sql.DriverManager;
>  import java.sql.DriverPropertyInfo;
>  import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
>  import java.util.Properties;
> +import java.util.logging.Logger;
>  
>  /**
>   * Mock object implementing the <code>java.sql.Driver</code> interface.
> @@ -125,6 +127,11 @@ public class TesterDriver implements Dri
>          return new DriverPropertyInfo[0];
>      }
>  
> +    @Override
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        throw new SQLFeatureNotSupportedException();
> +    }
> +
>      protected static final String CONNECT_STRING = 
> "jdbc:apache:commons:testdriver";
>  
>      // version numbers
>
> Modified: 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterResultSet.java
>  Thu Jan 10 16:57:07 2013
> @@ -28,6 +28,7 @@ import java.sql.SQLException;
>  import java.sql.SQLWarning;
>  import java.sql.Statement;
>  import java.util.Calendar;
> +import java.util.Map;
>  /* JDBC_4_ANT_KEY_BEGIN */
>  import java.io.InputStream;
>  import java.io.Reader;
> @@ -750,7 +751,7 @@ public SQLWarning getWarnings() throws S
>  
>  
>      @Override
> -    public Object getObject(int i, java.util.Map map) throws SQLException {
> +    public Object getObject(int i, Map<String,Class<?>> map) throws 
> SQLException {
>          checkOpen();
>          return new Object();
>      }
> @@ -780,7 +781,7 @@ public SQLWarning getWarnings() throws S
>      }
>  
>      @Override
> -    public Object getObject(String colName, java.util.Map map) throws 
> SQLException {
> +    public Object getObject(String colName, Map<String,Class<?>> map) throws 
> SQLException {
>          checkOpen();
>          return colName;
>      }
> @@ -1162,4 +1163,15 @@ public SQLWarning getWarnings() throws S
>          throw new SQLException("Not implemented.");
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public <T> T getObject(int columnIndex, Class<T> type) throws 
> SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
> +
> +    @Override
> +    public <T> T getObject(String columnLabel, Class<T> type)
> +            throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TesterStatement.java
>  Thu Jan 10 16:57:07 2013
> @@ -338,4 +338,14 @@ public class TesterStatement implements 
>          throw new SQLException("Not implemented.");
>      }
>  /* JDBC_4_ANT_KEY_END */
> +
> +    @Override
> +    public void closeOnCompletion() throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
> +
> +    @Override
> +    public boolean isCloseOnCompletion() throws SQLException {
> +        throw new SQLException("Not implemented.");
> +    }
>  }
>
> Modified: 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java
> URL: 
> http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java?rev=1431496&r1=1431495&r2=1431496&view=diff
> ==============================================================================
> --- 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java
>  (original)
> +++ 
> commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/datasources/ConnectionPoolDataSourceProxy.java
>  Thu Jan 10 16:57:07 2013
> @@ -19,6 +19,9 @@ package org.apache.commons.dbcp2.datasou
>  
>  import java.io.PrintWriter;
>  import java.sql.SQLException;
> +import java.sql.SQLFeatureNotSupportedException;
> +import java.util.logging.Logger;
> +
>  import javax.sql.ConnectionPoolDataSource;
>  import javax.sql.PooledConnection;
>  
> @@ -77,6 +80,11 @@ public class ConnectionPoolDataSourcePro
>          delegate.setLogWriter(out);     
>      }
>      
> +    @Override
> +    public Logger getParentLogger() throws SQLFeatureNotSupportedException {
> +        return delegate.getParentLogger();
> +    }
> +
>      /**
>       * Create a TesterPooledConnection with notifyOnClose turned on
>       */
> @@ -85,5 +93,4 @@ public class ConnectionPoolDataSourcePro
>          tpc.setNotifyOnClose(true);
>          return tpc; 
>      }
> -
>  }
>
>
>


-- 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to