You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/10/25 15:24:32 UTC
[tomcat] branch 7.0.x updated: Fix remaining IDE warnings in DBCP
1.x test classes
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new ee495b6 Fix remaining IDE warnings in DBCP 1.x test classes
ee495b6 is described below
commit ee495b658dafd6ca22b012e00710d750a51601ae
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Oct 25 17:23:33 2019 +0200
Fix remaining IDE warnings in DBCP 1.x test classes
---
.../tomcat/dbcp/dbcp/TesterCallableStatement.java | 22 ++++++++++++++++
.../apache/tomcat/dbcp/dbcp/TesterConnection.java | 29 ++++++++++++++++++++++
.../tomcat/dbcp/dbcp/TesterDatabaseMetaData.java | 19 ++++++++++++++
.../apache/tomcat/dbcp/dbcp/TesterResultSet.java | 22 ++++++++++++++++
.../apache/tomcat/dbcp/dbcp/TesterStatement.java | 12 +++++++++
5 files changed, 104 insertions(+)
diff --git a/test/org/apache/tomcat/dbcp/dbcp/TesterCallableStatement.java b/test/org/apache/tomcat/dbcp/dbcp/TesterCallableStatement.java
index fba4681..debe612 100644
--- a/test/org/apache/tomcat/dbcp/dbcp/TesterCallableStatement.java
+++ b/test/org/apache/tomcat/dbcp/dbcp/TesterCallableStatement.java
@@ -570,12 +570,34 @@ public class TesterCallableStatement extends TesterPreparedStatement implements
/* JDBC_4_ANT_KEY_END */
/* JDBC_4_1_ANT_KEY_BEGIN */
+ /**
+ * Hard-coded to return null.
+ *
+ * @param <T> Unused
+ * @param parameterIndex Unused
+ * @param type Unused
+ *
+ * @return Always false
+ *
+ * @throws SQLException Never happens
+ */
// No @Override else it won't compile with Java 6
public <T> T getObject(int parameterIndex, Class<T> type)
throws SQLException {
return null;
}
+ /**
+ * Hard-coded to return null.
+ *
+ * @param <T> Unused
+ * @param parameterName Unused
+ * @param type Unused
+ *
+ * @return Always false
+ *
+ * @throws SQLException Never happens
+ */
// No @Override else it won't compile with Java 6
public <T> T getObject(String parameterName, Class<T> type)
throws SQLException {
diff --git a/test/org/apache/tomcat/dbcp/dbcp/TesterConnection.java b/test/org/apache/tomcat/dbcp/dbcp/TesterConnection.java
index 44212fa..bd4d8a3 100644
--- a/test/org/apache/tomcat/dbcp/dbcp/TesterConnection.java
+++ b/test/org/apache/tomcat/dbcp/dbcp/TesterConnection.java
@@ -386,21 +386,50 @@ public class TesterConnection implements Connection {
/* JDBC_4_ANT_KEY_END */
/* JDBC_4_1_ANT_KEY_BEGIN */
+ /**
+ * Not implemented.
+ *
+ * @param schema Unused
+ *
+ * @throws SQLException Always
+ */
// No @Override else it won't compile with Java 6
public void setSchema(String schema) throws SQLException {
throw new SQLException("Not implemented.");
}
+ /**
+ * Not implemented.
+ *
+ * @return Never returns normally
+ *
+ * @throws SQLException Always
+ */
// No @Override else it won't compile with Java 6
public String getSchema() throws SQLException {
throw new SQLException("Not implemented.");
}
+ /**
+ * Not implemented.
+ *
+ * @param executor Unused
+ *
+ * @throws SQLException Always
+ */
// No @Override else it won't compile with Java 6
public void abort(Executor executor) throws SQLException {
throw new SQLException("Not implemented.");
}
+ /**
+ * Not implemented.
+ *
+ * @param executor Unused
+ * @param milliseconds Unused
+ *
+ * @throws SQLException Always
+ */
// No @Override else it won't compile with Java 6
public void setNetworkTimeout(Executor executor, int milliseconds)
throws SQLException {
diff --git a/test/org/apache/tomcat/dbcp/dbcp/TesterDatabaseMetaData.java b/test/org/apache/tomcat/dbcp/dbcp/TesterDatabaseMetaData.java
index 6d86469..16a654c 100644
--- a/test/org/apache/tomcat/dbcp/dbcp/TesterDatabaseMetaData.java
+++ b/test/org/apache/tomcat/dbcp/dbcp/TesterDatabaseMetaData.java
@@ -936,6 +936,18 @@ public class TesterDatabaseMetaData implements DatabaseMetaData {
/* JDBC_4_ANT_KEY_END */
/* JDBC_4_1_ANT_KEY_BEGIN */
+ /**
+ * Hard-coded to return null.
+ *
+ * @param catalog Unused
+ * @param schemaPattern Unused
+ * @param tableNamePattern Unused
+ * @param columnNamePattern Unused
+ *
+ * @return Always false
+ *
+ * @throws SQLException Never happens
+ */
// No @Override else it won't compile with Java 6
public ResultSet getPseudoColumns(String catalog, String schemaPattern,
String tableNamePattern, String columnNamePattern)
@@ -943,6 +955,13 @@ public class TesterDatabaseMetaData implements DatabaseMetaData {
return null;
}
+ /**
+ * Hard-coded to always return false.
+ *
+ * @return Always false
+ *
+ * @throws SQLException Never happens
+ */
// No @Override else it won't compile with Java 6
public boolean generatedKeyAlwaysReturned() throws SQLException {
return false;
diff --git a/test/org/apache/tomcat/dbcp/dbcp/TesterResultSet.java b/test/org/apache/tomcat/dbcp/dbcp/TesterResultSet.java
index f934b35..69e67ad 100644
--- a/test/org/apache/tomcat/dbcp/dbcp/TesterResultSet.java
+++ b/test/org/apache/tomcat/dbcp/dbcp/TesterResultSet.java
@@ -1165,11 +1165,33 @@ public SQLWarning getWarnings() throws SQLException {
/* JDBC_4_ANT_KEY_END */
/* JDBC_4_1_ANT_KEY_BEGIN */
+ /**
+ * Not implemented.
+ *
+ * @param <T> Unused
+ * @param columnIndex Unused
+ * @param type Unused
+ *
+ * @return Never returns normally
+ *
+ * @throws SQLException Always
+ */
// No @Override else it won't compile with Java 6
public <T> T getObject(int columnIndex, Class<T> type) throws SQLException {
throw new SQLException("Not implemented.");
}
+ /**
+ * Not implemented.
+ *
+ * @param <T> unused
+ * @param columnLabel unused
+ * @param type unused
+ *
+ * @return Never returns normally
+ *
+ * @throws SQLException Always
+ */
// No @Override else it won't compile with Java 6
public <T> T getObject(String columnLabel, Class<T> type)
throws SQLException {
diff --git a/test/org/apache/tomcat/dbcp/dbcp/TesterStatement.java b/test/org/apache/tomcat/dbcp/dbcp/TesterStatement.java
index 2d19dab..3b2f688 100644
--- a/test/org/apache/tomcat/dbcp/dbcp/TesterStatement.java
+++ b/test/org/apache/tomcat/dbcp/dbcp/TesterStatement.java
@@ -340,10 +340,22 @@ public class TesterStatement implements Statement {
/* JDBC_4_ANT_KEY_END */
/* JDBC_4_1_ANT_KEY_BEGIN */
+ /**
+ * NO-OP.
+ *
+ * @throws SQLException Never happens
+ */
// No @Override else it won't compile with Java 6
public void closeOnCompletion() throws SQLException {
}
+ /**
+ * Hard-coded to always return false.
+ *
+ * @return Always false
+ *
+ * @throws SQLException Never happens
+ */
// No @Override else it won't compile with Java 6
public boolean isCloseOnCompletion() throws SQLException {
return false;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org