From 2b781c5201fb389bff554ee0086e8b45425775f9 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 8 Sep 2011 14:28:22 +0000 Subject: [PATCH] Fix Eclipse warnings git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1166709 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tomcat/jdbc/test/driver/Connection.java | 49 ++++++++++++++++++++++ .../org/apache/tomcat/jdbc/test/driver/Driver.java | 6 +++ .../apache/tomcat/jdbc/test/driver/ResultSet.java | 11 +++++ 3 files changed, 66 insertions(+) diff --git a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Connection.java b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Connection.java index 8fc388822..c3846bf66 100644 --- a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Connection.java +++ b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Connection.java @@ -50,187 +50,236 @@ public class Connection implements java.sql.Connection { return info.getProperty(PooledConnection.PROP_PASSWORD); } + @Override public void clearWarnings() throws SQLException { } + @Override public void close() throws SQLException { Driver.disconnectCount.incrementAndGet(); } + @Override public void commit() throws SQLException { } + @Override public Array createArrayOf(String typeName, Object[] elements) throws SQLException { return null; } + @Override public Blob createBlob() throws SQLException { return null; } + @Override public Clob createClob() throws SQLException { return null; } + @Override public NClob createNClob() throws SQLException { return null; } + @Override public SQLXML createSQLXML() throws SQLException { return null; } + @Override public Statement createStatement() throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public Struct createStruct(String typeName, Object[] attributes) throws SQLException { return null; } + @Override public boolean getAutoCommit() throws SQLException { return false; } + @Override public String getCatalog() throws SQLException { return null; } + @Override public Properties getClientInfo() throws SQLException { return null; } + @Override public String getClientInfo(String name) throws SQLException { return null; } + @Override public int getHoldability() throws SQLException { return 0; } + @Override public DatabaseMetaData getMetaData() throws SQLException { return null; } + @Override public int getTransactionIsolation() throws SQLException { return 0; } + @Override public Map> getTypeMap() throws SQLException { return null; } + @Override public SQLWarning getWarnings() throws SQLException { return null; } + @Override public boolean isClosed() throws SQLException { return false; } + @Override public boolean isReadOnly() throws SQLException { return false; } + @Override public boolean isValid(int timeout) throws SQLException { return false; } + @Override public String nativeSQL(String sql) throws SQLException { return null; } + @Override public CallableStatement prepareCall(String sql) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public PreparedStatement prepareStatement(String sql) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { return new org.apache.tomcat.jdbc.test.driver.Statement(); } + @Override public void releaseSavepoint(Savepoint savepoint) throws SQLException { } + @Override public void rollback() throws SQLException { } + @Override public void rollback(Savepoint savepoint) throws SQLException { } + @Override public void setAutoCommit(boolean autoCommit) throws SQLException { } + @Override public void setCatalog(String catalog) throws SQLException { } + @Override public void setClientInfo(Properties properties) throws SQLClientInfoException { } + @Override public void setClientInfo(String name, String value) throws SQLClientInfoException { } + @Override public void setHoldability(int holdability) throws SQLException { } + @Override public void setReadOnly(boolean readOnly) throws SQLException { } + @Override public Savepoint setSavepoint() throws SQLException { return null; } + @Override public Savepoint setSavepoint(String name) throws SQLException { return null; } + @Override public void setTransactionIsolation(int level) throws SQLException { } + @Override public void setTypeMap(Map> map) throws SQLException { } + @Override public boolean isWrapperFor(Class iface) throws SQLException { return false; } + @Override public T unwrap(Class iface) throws SQLException { return null; } diff --git a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Driver.java b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Driver.java index 0b3d8cd00..52c5830c8 100644 --- a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Driver.java +++ b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/Driver.java @@ -45,27 +45,33 @@ public class Driver implements java.sql.Driver { public Driver() { } + @Override public boolean acceptsURL(String url) throws SQLException { return url!=null && url.equals(Driver.url); } + @Override public Connection connect(String url, Properties info) throws SQLException { connectCount.addAndGet(1); return new org.apache.tomcat.jdbc.test.driver.Connection(info); } + @Override public int getMajorVersion() { return 0; } + @Override public int getMinorVersion() { return 0; } + @Override public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { return null; } + @Override public boolean jdbcCompliant() { return false; } diff --git a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/ResultSet.java b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/ResultSet.java index 9986c48a3..398c73330 100644 --- a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/ResultSet.java +++ b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/test/driver/ResultSet.java @@ -41,39 +41,50 @@ import java.util.Map; public class ResultSet implements java.sql.ResultSet { boolean hasNext = true; + @Override public boolean absolute(int row) throws SQLException { return false; } + @Override public void afterLast() throws SQLException { } + @Override public void beforeFirst() throws SQLException { } + @Override public void cancelRowUpdates() throws SQLException { } + @Override public void clearWarnings() throws SQLException { } + @Override public void close() throws SQLException { } + @Override public void deleteRow() throws SQLException { } + @Override public int findColumn(String columnLabel) throws SQLException { return 0; } + @Override public boolean first() throws SQLException { return hasNext; } + @Override public Array getArray(int columnIndex) throws SQLException { return null; } + @Override public Array getArray(String columnLabel) throws SQLException { return null; } -- 2.11.0