diff options
author | Paul de Vrieze <pauldv@gentoo.org> | 2014-03-25 16:17:17 +0000 |
---|---|---|
committer | Paul de Vrieze <pauldv@gentoo.org> | 2014-03-25 16:17:17 +0000 |
commit | 1095e161942a77a7ab76fe55eccf313295b4174f (patch) | |
tree | a7a7e61d9266ac69fc5dec0df4d03511f9d982ed /dev-java/commons-dbcp | |
parent | No longer needed (diff) | |
download | pauldv-1095e161942a77a7ab76fe55eccf313295b4174f.tar.gz pauldv-1095e161942a77a7ab76fe55eccf313295b4174f.tar.bz2 pauldv-1095e161942a77a7ab76fe55eccf313295b4174f.zip |
Add a patch to make it work with jdk 1.7
svn path=/trunk/overlay/; revision=165
Diffstat (limited to 'dev-java/commons-dbcp')
-rw-r--r-- | dev-java/commons-dbcp/Manifest | 4 | ||||
-rw-r--r-- | dev-java/commons-dbcp/NOTES | 1 | ||||
-rw-r--r-- | dev-java/commons-dbcp/commons-dbcp-1.4-r2.ebuild | 62 | ||||
-rw-r--r-- | dev-java/commons-dbcp/files/jdk1.7.patch | 519 |
4 files changed, 586 insertions, 0 deletions
diff --git a/dev-java/commons-dbcp/Manifest b/dev-java/commons-dbcp/Manifest new file mode 100644 index 0000000..e9d8abe --- /dev/null +++ b/dev-java/commons-dbcp/Manifest @@ -0,0 +1,4 @@ +AUX jdk1.7.patch 20260 SHA256 d5b8cdd62e1fdec30c234f7890bf7dec8327897b4717e5e87abde5cd15db48ad SHA512 7f3ed3148a17d451264a9e9c218df6b142186d8c49bb26e50254fdeaf24dca44dd8232d628971d22372b113125be47269a276f7820377b1290d78e52fd12962d WHIRLPOOL dce7a7e6d0eafd6aa2d113098c395c5fdae20fa14ea9ed1345a5e2f3091bed7c7f9b900c95bb391a22b5dc26cc44cd52118f67898960aa3583a90a959a4595d7 +DIST commons-dbcp-1.4-src.tar.gz 932507 SHA256 f5f10846e79fc71121fe7402c61d71575506b01b59e719e974ebc4d99e6df283 SHA512 70f32ea36bae46290dc376e6040539562de98906810bd4e1985667c336e6215dc5536278000fee5d9f200cc4b97ea0a6cff74a871e962b61203741814a9c5e7b WHIRLPOOL c917bd417d95e7fc2448c87d949f440ad829ea794b943e707a23154fafaf9eeccaa2900ae7ccb27cf03c56d7e0727177e56c47f157ee85ab1be7c67d18702b26 +EBUILD commons-dbcp-1.4-r2.ebuild 1677 SHA256 de609a935db0a19ae04458e882255b1dc6e5956d7c631f9c2c87765f95569124 SHA512 8c58812b9305c816135eb7a49e89572831ff80d8aee221f1b2ee6b43b3c74ac5ff0b7c68c01b3985c647ee3dce50ab3aa58d645b11a35c7f27da65a5a7156616 WHIRLPOOL d5aa43fb6facfe51f365a8cfadd1faaf04b0d9700cc5b738d77fd96a92e74c7be71284d165cbed4edfc8649d20e87b76b22bbf1a73c0aeb7b96bd68ed2c40a95 +MISC NOTES 27 SHA256 a5ad0f8f3824b4677c885fae8206c8439ea9675df6b49af7263691d86910c145 SHA512 3cb1d596d9954a7a43700851e386029c3092b419dadd15c2b357c417ab8193967affde81da127e3b86ca4f476b00ff79b5b69daf9c536bc7f2554880758708cd WHIRLPOOL 9878485b8498c45911ca7c97a93ff6b4b220445645dec427d3f5a7be884fdeffc323ca6920f4df1e75493b5854a7190d50d2d4c97f443c177209509ee44e2874 diff --git a/dev-java/commons-dbcp/NOTES b/dev-java/commons-dbcp/NOTES new file mode 100644 index 0000000..366df31 --- /dev/null +++ b/dev-java/commons-dbcp/NOTES @@ -0,0 +1 @@ +Use jdk 1.7 instead of six diff --git a/dev-java/commons-dbcp/commons-dbcp-1.4-r2.ebuild b/dev-java/commons-dbcp/commons-dbcp-1.4-r2.ebuild new file mode 100644 index 0000000..858e285 --- /dev/null +++ b/dev-java/commons-dbcp/commons-dbcp-1.4-r2.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/commons-dbcp/commons-dbcp-1.4-r2.ebuild,v 1.5 2012/06/07 21:24:10 ranger Exp $ + +EAPI=4 + +JAVA_PKG_IUSE="doc source test" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="Jakarta component providing database connection pooling API" +HOMEPAGE="http://commons.apache.org/dbcp/" +SRC_URI="mirror://apache/commons/dbcp/source/${P}-src.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="" + +COMMON_DEP=" + dev-java/commons-pool:0 + java-virtuals/transaction-api:0" +RDEPEND="${COMMON_DEP} + >=virtual/jre-1.6" +DEPEND="${COMMON_DEP} + >=virtual/jdk-1.6 + test? ( dev-java/ant-junit:0 )" + +S="${WORKDIR}/${P}-src" + +JAVA_ANT_REWRITE_CLASSPATH="yes" +JAVA_ANT_CLASSPATH_TAGS+=" javadoc" + +EANT_BUILD_TARGET="build-jar" +EANT_GENTOO_CLASSPATH="commons-pool,transaction-api" + +PATCHES="${FILESDIR}/jdk1.7.patch" + +src_prepare() { + epatch ${FILESDIR}/jdk1.7.patch + java-pkg-2_src_prepare +} + +src_test() { + # depend on not packaged geronimo #348853 + rm -v src/test/org/apache/commons/dbcp/managed/TestBasicManagedDataSource.java || die + rm -v src/test/org/apache/commons/dbcp/managed/TestManagedDataSource.java || die + rm -v src/test/org/apache/commons/dbcp/managed/TestManagedDataSourceInTx.java || die + + # fails :( + rm -v src/test/org/apache/commons/dbcp/TestJndi.java || die + + java-pkg-2_src_test +} + +src_install() { + java-pkg_dojar dist/${PN}*.jar + dodoc README.txt RELEASE-NOTES.txt + + use doc && java-pkg_dojavadoc dist/docs/api + use source && java-pkg_dosrc src/java/* +} diff --git a/dev-java/commons-dbcp/files/jdk1.7.patch b/dev-java/commons-dbcp/files/jdk1.7.patch new file mode 100644 index 0000000..9bfb2c3 --- /dev/null +++ b/dev-java/commons-dbcp/files/jdk1.7.patch @@ -0,0 +1,519 @@ +diff -ur src.old/java/org/apache/commons/dbcp/BasicDataSource.java src/java/org/apache/commons/dbcp/BasicDataSource.java +--- src.old/java/org/apache/commons/dbcp/BasicDataSource.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/BasicDataSource.java 2014-03-25 13:55:40.752579143 +0000 +@@ -24,10 +24,12 @@ + 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.pool.KeyedObjectPoolFactory; +@@ -1579,4 +1581,8 @@ + logWriter.println(message); + } + } ++ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } + } +diff -ur src.old/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java src/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java +--- src.old/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/cpdsadapter/DriverAdapterCPDS.java 2014-03-25 15:25:25.795205555 +0000 +@@ -17,22 +17,25 @@ + + package org.apache.commons.dbcp.cpdsadapter; + +-import java.util.Hashtable; +-import java.util.Properties; + import java.io.PrintWriter; + import java.io.Serializable; + import java.sql.DriverManager; + import java.sql.SQLException; +-import javax.sql.PooledConnection; +-import javax.sql.ConnectionPoolDataSource; +-import javax.naming.Name; ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.Hashtable; ++import java.util.Properties; ++import java.util.logging.Logger; ++ + import javax.naming.Context; +-import javax.naming.Referenceable; +-import javax.naming.spi.ObjectFactory; +-import javax.naming.Reference; ++import javax.naming.Name; ++import javax.naming.NamingException; + import javax.naming.RefAddr; ++import javax.naming.Reference; ++import javax.naming.Referenceable; + import javax.naming.StringRefAddr; +-import javax.naming.NamingException; ++import javax.naming.spi.ObjectFactory; ++import javax.sql.ConnectionPoolDataSource; ++import javax.sql.PooledConnection; + + import org.apache.commons.pool.KeyedObjectPool; + import org.apache.commons.pool.impl.GenericKeyedObjectPool; +@@ -514,6 +517,10 @@ + public PrintWriter getLogWriter() { + return logWriter; + } ++ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } + + /** + * Sets the maximum time in seconds that this data source will wait +diff -ur src.old/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java +--- src.old/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java 2014-03-25 15:03:27.672985191 +0000 +@@ -21,8 +21,10 @@ + 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; +@@ -417,6 +419,10 @@ + public void setLogWriter(PrintWriter v) { + this.logWriter = v; + } ++ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } + + /** + * @see #getTestOnBorrow +Only in src/java/org/apache/commons/dbcp/datasources: .InstanceKeyDataSource.java.swp +diff -ur src.old/java/org/apache/commons/dbcp/DelegatingCallableStatement.java src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java +--- src.old/java/org/apache/commons/dbcp/DelegatingCallableStatement.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java 2014-03-25 14:32:12.216370435 +0000 +@@ -143,6 +143,12 @@ + public Object getObject(int parameterIndex) throws SQLException + { checkOpen(); try { return ((CallableStatement)_stmt).getObject( parameterIndex); } catch (SQLException e) { handleException(e); return null; } } + ++ 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; } } ++ ++ public <T> T getObject(String name, Class<T> type) throws SQLException ++ { checkOpen(); try { return ((CallableStatement)_stmt).getObject( name, type); } catch (SQLException e) { handleException(e); return null; } } ++ + public BigDecimal getBigDecimal(int parameterIndex) throws SQLException + { checkOpen(); try { return ((CallableStatement)_stmt).getBigDecimal( parameterIndex); } catch (SQLException e) { handleException(e); return null; } } + +@@ -329,6 +335,7 @@ + public URL getURL(String parameterName) throws SQLException + { checkOpen(); try { return ((CallableStatement)_stmt).getURL(parameterName); } catch (SQLException e) { handleException(e); return null; } } + ++ + /* JDBC_4_ANT_KEY_BEGIN */ + + public RowId getRowId(int parameterIndex) throws SQLException { +diff -ur src.old/java/org/apache/commons/dbcp/DelegatingConnection.java src/java/org/apache/commons/dbcp/DelegatingConnection.java +--- src.old/java/org/apache/commons/dbcp/DelegatingConnection.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/DelegatingConnection.java 2014-03-25 15:25:06.381594054 +0000 +@@ -27,6 +27,7 @@ + import java.util.Iterator; + import java.util.List; + import java.util.Map; ++import java.util.concurrent.Executor; + import java.sql.ResultSet; + /* JDBC_4_ANT_KEY_BEGIN */ + import java.sql.Array; +@@ -538,6 +539,60 @@ + } + } + ++ public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { ++ checkOpen(); ++ try { ++ _conn.setNetworkTimeout(executor, milliseconds); ++ } catch (SQLException e) { ++ handleException(e); ++ } ++ } ++ ++ ++ public int getNetworkTimeout() throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.getNetworkTimeout(); ++ } ++ catch (SQLException e) { ++ handleException(e); ++ throw new AssertionError(); ++ } ++ } ++ ++ public void abort(Executor executor) throws SQLException { ++ if (_conn!=null) { ++ try { ++ _conn.abort(executor); ++ } catch (SQLException e) { ++ handleException(e); ++ throw new AssertionError(); ++ } ++ } ++ } ++ ++ @Override ++ public void setSchema(String schema) throws SQLException { ++ checkOpen(); ++ try { ++ _conn.setSchema(schema); ++ } catch (SQLException e) { ++ handleException(e); ++ throw new AssertionError(); ++ } ++ } ++ ++ @Override ++ public String getSchema() throws SQLException { ++ checkOpen(); ++ try { ++ return _conn.getSchema(); ++ } catch (SQLException e) { ++ handleException(e); ++ throw new AssertionError(); ++ } ++ } ++ + /* JDBC_4_ANT_KEY_BEGIN */ + + public boolean isWrapperFor(Class<?> iface) throws SQLException { +diff -ur src.old/java/org/apache/commons/dbcp/DelegatingDatabaseMetaData.java src/java/org/apache/commons/dbcp/DelegatingDatabaseMetaData.java +--- src.old/java/org/apache/commons/dbcp/DelegatingDatabaseMetaData.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/DelegatingDatabaseMetaData.java 2014-03-25 14:36:20.719641630 +0000 +@@ -270,6 +270,23 @@ + catch (SQLException e) { handleException(e); return 0; } } + } + ++ public boolean generatedKeyAlwaysReturned() throws SQLException { ++ { try { return _meta.generatedKeyAlwaysReturned(); } ++ catch (SQLException e) { handleException(e); return false; } } ++ } ++ ++ 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(); ++ } ++ } ++ + public int getDriverMajorVersion() {return _meta.getDriverMajorVersion();} + + public int getDriverMinorVersion() {return _meta.getDriverMinorVersion();} +diff -ur src.old/java/org/apache/commons/dbcp/DelegatingResultSet.java src/java/org/apache/commons/dbcp/DelegatingResultSet.java +--- src.old/java/org/apache/commons/dbcp/DelegatingResultSet.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/DelegatingResultSet.java 2014-03-25 14:37:14.777029363 +0000 +@@ -324,9 +324,15 @@ + public Object getObject(int columnIndex) throws SQLException + { try { return _res.getObject(columnIndex); } catch (SQLException e) { handleException(e); return null; } } + ++ public <T> T getObject(int columnIndex, Class<T> type) throws SQLException ++ { try { return _res.getObject(columnIndex, type); } catch (SQLException e) { handleException(e); return null; } } ++ + public Object getObject(String columnName) throws SQLException + { try { return _res.getObject(columnName); } catch (SQLException e) { handleException(e); return null; } } + ++ public <T> T getObject(String columnName, Class<T> type) throws SQLException ++ { try { return _res.getObject(columnName, type); } catch (SQLException e) { handleException(e); return null; } } ++ + public int findColumn(String columnName) throws SQLException + { try { return _res.findColumn(columnName); } catch (SQLException e) { handleException(e); return 0; } } + +diff -ur src.old/java/org/apache/commons/dbcp/DelegatingStatement.java src/java/org/apache/commons/dbcp/DelegatingStatement.java +--- src.old/java/org/apache/commons/dbcp/DelegatingStatement.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/DelegatingStatement.java 2014-03-25 14:32:21.113152723 +0000 +@@ -23,6 +23,7 @@ + import java.sql.SQLWarning; + import java.sql.Statement; + import java.util.List; ++import java.util.concurrent.Executor; + + /** + * A base delegating implementation of {@link Statement}. +@@ -191,6 +192,26 @@ + } + } + ++ public void closeOnCompletion() throws SQLException { ++ checkOpen(); ++ try { ++ _stmt.closeOnCompletion(); ++ } catch (SQLException e) { ++ handleException(e); ++ throw new AssertionError(); ++ } ++ } ++ ++ public boolean isCloseOnCompletion() throws SQLException { ++ checkOpen(); ++ try { ++ return _stmt.isCloseOnCompletion(); ++ } catch (SQLException e) { ++ handleException(e); ++ throw new AssertionError(); ++ } ++ } ++ + protected void passivate() throws SQLException { + if(_stmt instanceof DelegatingStatement) { + ((DelegatingStatement)_stmt).passivate(); +diff -ur src.old/java/org/apache/commons/dbcp/PoolingDataSource.java src/java/org/apache/commons/dbcp/PoolingDataSource.java +--- src.old/java/org/apache/commons/dbcp/PoolingDataSource.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/PoolingDataSource.java 2014-03-25 15:03:08.289371317 +0000 +@@ -25,8 +25,10 @@ + import java.sql.SQLException; + import java.sql.SQLWarning; + import java.sql.Statement; ++import java.sql.SQLFeatureNotSupportedException; + import java.util.Map; + import java.util.NoSuchElementException; ++import java.util.logging.Logger; + + import javax.sql.DataSource; + +@@ -167,6 +169,10 @@ + + protected ObjectPool _pool = null; + ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + /** + * PoolGuardConnectionWrapper is a Connection wrapper that makes sure a + * closed connection cannot be used anymore. +diff -ur src.old/java/org/apache/commons/dbcp/PoolingDriver.java src/java/org/apache/commons/dbcp/PoolingDriver.java +--- src.old/java/org/apache/commons/dbcp/PoolingDriver.java 2010-02-07 16:59:20.000000000 +0000 ++++ src/java/org/apache/commons/dbcp/PoolingDriver.java 2014-03-25 15:30:36.676312656 +0000 +@@ -19,21 +19,13 @@ + + import java.io.IOException; + import java.io.InputStream; +-import java.sql.CallableStatement; +-import java.sql.Connection; +-import java.sql.DatabaseMetaData; +-import java.sql.Driver; +-import java.sql.DriverManager; +-import java.sql.DriverPropertyInfo; +-import java.sql.PreparedStatement; +-import java.sql.SQLException; +-import java.sql.SQLWarning; +-import java.sql.Statement; ++import java.sql.*; + import java.util.HashMap; + 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.jocl.JOCLContentHandler; + import org.apache.commons.pool.ObjectPool; +@@ -239,6 +231,10 @@ + return new DriverPropertyInfo[0]; + } + ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + /** My URL prefix */ + protected static final String URL_PREFIX = "jdbc:apache:commons:dbcp:"; + protected static final int URL_PREFIX_LEN = URL_PREFIX.length(); +diff -ur src.old/test/org/apache/commons/dbcp/datasources/ConnectionPoolDataSourceProxy.java src/test/org/apache/commons/dbcp/datasources/ConnectionPoolDataSourceProxy.java +--- src.old/test/org/apache/commons/dbcp/datasources/ConnectionPoolDataSourceProxy.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/test/org/apache/commons/dbcp/datasources/ConnectionPoolDataSourceProxy.java 2014-03-25 16:02:00.459832403 +0000 +@@ -19,6 +19,9 @@ + + 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; + +@@ -80,4 +83,9 @@ + return tpc; + } + ++ @Override ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException(); ++ } ++ + } +diff -ur src.old/test/org/apache/commons/dbcp/TesterCallableStatement.java src/test/org/apache/commons/dbcp/TesterCallableStatement.java +--- src.old/test/org/apache/commons/dbcp/TesterCallableStatement.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/test/org/apache/commons/dbcp/TesterCallableStatement.java 2014-03-25 15:31:58.090805042 +0000 +@@ -128,6 +128,16 @@ + return null; + } + ++ @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; ++ } ++ + public BigDecimal getBigDecimal(int parameterIndex) throws SQLException { + return null; + } +@@ -456,4 +466,14 @@ + public void setNClob(String parameterName, Reader reader) throws SQLException { + } + /* JDBC_4_ANT_KEY_END */ ++ ++ @Override ++ public void closeOnCompletion() throws SQLException { ++ ++ } ++ ++ @Override ++ public boolean isCloseOnCompletion() throws SQLException { ++ return false; ++ } + } +diff -ur src.old/test/org/apache/commons/dbcp/TesterConnection.java src/test/org/apache/commons/dbcp/TesterConnection.java +--- src.old/test/org/apache/commons/dbcp/TesterConnection.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/test/org/apache/commons/dbcp/TesterConnection.java 2014-03-25 15:32:46.261490175 +0000 +@@ -35,6 +35,7 @@ + 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. +@@ -334,4 +335,25 @@ + throw new SQLException("Not implemented."); + } + /* JDBC_4_ANT_KEY_END */ ++ ++ public void setSchema(String schema) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public String getSchema() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void abort(Executor executor) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ ++ public int getNetworkTimeout() throws SQLException { ++ throw new SQLException("Not implemented."); ++ } ++ + } +diff -ur src.old/test/org/apache/commons/dbcp/TesterDatabaseMetaData.java src/test/org/apache/commons/dbcp/TesterDatabaseMetaData.java +--- src.old/test/org/apache/commons/dbcp/TesterDatabaseMetaData.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/test/org/apache/commons/dbcp/TesterDatabaseMetaData.java 2014-03-25 15:33:50.245748196 +0000 +@@ -761,4 +761,14 @@ + } + + /* JDBC_4_ANT_KEY_END */ ++ ++ public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) ++ throws SQLException { ++ return null; ++ } ++ ++ @Override ++ public boolean generatedKeyAlwaysReturned() throws SQLException { ++ return false; ++ } + } +diff -ur src.old/test/org/apache/commons/dbcp/TesterDriver.java src/test/org/apache/commons/dbcp/TesterDriver.java +--- src.old/test/org/apache/commons/dbcp/TesterDriver.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/test/org/apache/commons/dbcp/TesterDriver.java 2014-03-25 15:34:14.306096159 +0000 +@@ -22,7 +22,9 @@ + 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. +@@ -116,6 +118,10 @@ + return new DriverPropertyInfo[0]; + } + ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ return null; ++ } ++ + protected static final String CONNECT_STRING = "jdbc:apache:commons:testdriver"; + + // version numbers +diff -ur src.old/test/org/apache/commons/dbcp/TesterResultSet.java src/test/org/apache/commons/dbcp/TesterResultSet.java +--- src.old/test/org/apache/commons/dbcp/TesterResultSet.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/test/org/apache/commons/dbcp/TesterResultSet.java 2014-03-25 15:45:08.482149168 +0000 +@@ -305,6 +305,16 @@ + return columnName; + } + ++ @Override ++ public <T> T getObject(int columnIndex, Class<T> type) throws SQLException { ++ return type.cast(getObject(columnIndex)); ++ } ++ ++ @Override ++ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException { ++ return type.cast(getObject(columnLabel)); ++ } ++ + public int findColumn(String columnName) throws SQLException { + checkOpen(); + return 1; +diff -ur src.old/test/org/apache/commons/dbcp/TesterStatement.java src/test/org/apache/commons/dbcp/TesterStatement.java +--- src.old/test/org/apache/commons/dbcp/TesterStatement.java 2010-02-07 16:59:19.000000000 +0000 ++++ src/test/org/apache/commons/dbcp/TesterStatement.java 2014-03-25 16:00:41.102044772 +0000 +@@ -296,4 +296,15 @@ + 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."); ++ } ++ + } |