This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push:
new 138841a Better param name.
138841a is described below
commit 138841a20bf0df6a4e09021f0e0427c54e8c3e31
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Jun 2 09:56:55 2021 -0400
Better param name.
---
.../dbcp2/cpdsadapter/DriverAdapterCPDS.java | 14 +++---
.../dbcp2/datasources/InstanceKeyDataSource.java | 54 +++++++++++-----------
2 files changed, 34 insertions(+), 34 deletions(-)
diff --git
a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
index 6e0ebd1..e11dc40 100644
--- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
+++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java
@@ -529,25 +529,25 @@ public class DriverAdapterCPDS implements
ConnectionPoolDataSource, Referenceabl
* Sets the value of description. This property is here for use by the
code which will deploy this datasource. It is
* not used internally.
*
- * @param v Value to assign to description.
+ * @param description Value to assign to description.
*/
- public void setDescription(final String v) {
- this.description = v;
+ public void setDescription(final String description) {
+ this.description = description;
}
/**
* Sets the driver class name. Setting the driver class name cause the
driver to be registered with the
* DriverManager.
*
- * @param v Value to assign to driver.
+ * @param driver Value to assign to driver.
* @throws IllegalStateException if {@link #getPooledConnection()} has
been called
* @throws ClassNotFoundException if the class cannot be located
*/
- public void setDriver(final String v) throws ClassNotFoundException {
+ public void setDriver(final String driver) throws ClassNotFoundException {
assertInitializationAllowed();
- this.driver = v;
+ this.driver = driver;
// make sure driver is registered
- Class.forName(v);
+ Class.forName(driver);
}
/**
diff --git
a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
index 39c0965..2b5dbab 100644
---
a/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
+++
b/src/main/java/org/apache/commons/dbcp2/datasources/InstanceKeyDataSource.java
@@ -534,18 +534,18 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
* Sets the back end ConnectionPoolDataSource. This property should not be
set if using JNDI to access the
* data source.
*
- * @param v
+ * @param dataSource
* Value to assign to connectionPoolDataSource.
*/
- public void setConnectionPoolDataSource(final ConnectionPoolDataSource v) {
+ public void setConnectionPoolDataSource(final ConnectionPoolDataSource
dataSource) {
assertInitializationAllowed();
if (dataSourceName != null) {
throw new IllegalStateException("Cannot set the DataSource, if
JNDI is used.");
}
- if (dataSource != null) {
+ if (this.dataSource != null) {
throw new IllegalStateException("The CPDS has already been set. It
cannot be altered.");
}
- dataSource = v;
+ this.dataSource = dataSource;
instanceKey = InstanceKeyDataSourceFactory.registerNewInstance(this);
}
@@ -563,19 +563,19 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
* Sets the name of the ConnectionPoolDataSource which backs this pool.
This name is used to look up the data source
* from a JNDI service provider.
*
- * @param v
+ * @param dataSourceName
* Value to assign to dataSourceName.
*/
- public void setDataSourceName(final String v) {
+ public void setDataSourceName(final String dataSourceName) {
assertInitializationAllowed();
if (dataSource != null) {
throw new IllegalStateException("Cannot set the JNDI name for the
DataSource, if already "
+ "set using setConnectionPoolDataSource.");
}
- if (dataSourceName != null) {
+ if (this.dataSourceName != null) {
throw new IllegalStateException("The DataSourceName has already
been set. " + "It cannot be altered.");
}
- this.dataSourceName = v;
+ this.dataSourceName = dataSourceName;
instanceKey = InstanceKeyDataSourceFactory.registerNewInstance(this);
}
@@ -595,12 +595,12 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
* can be changed on the Connection using
Connection.setAutoCommit(boolean). The default is <code>null</code> which
* will use the default value for the drive.
*
- * @param v
+ * @param defaultAutoCommit
* Value to assign to defaultAutoCommit.
*/
- public void setDefaultAutoCommit(final Boolean v) {
+ public void setDefaultAutoCommit(final Boolean defaultAutoCommit) {
assertInitializationAllowed();
- this.defaultAutoCommit = v;
+ this.defaultAutoCommit = defaultAutoCommit;
}
/**
@@ -619,12 +619,12 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
* can be changed on the Connection using Connection.setReadOnly(boolean).
The default is <code>null</code> which
* will use the default value for the drive.
*
- * @param v
+ * @param defaultReadOnly
* Value to assign to defaultReadOnly.
*/
- public void setDefaultReadOnly(final Boolean v) {
+ public void setDefaultReadOnly(final Boolean defaultReadOnly) {
assertInitializationAllowed();
- this.defaultReadOnly = v;
+ this.defaultReadOnly = defaultReadOnly;
}
/**
@@ -643,12 +643,12 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
* The value can be changed on the Connection using
Connection.setTransactionIsolation(int). The default is JDBC
* driver dependent.
*
- * @param v
+ * @param defaultTransactionIsolation
* Value to assign to defaultTransactionIsolation
*/
- public void setDefaultTransactionIsolation(final int v) {
+ public void setDefaultTransactionIsolation(final int
defaultTransactionIsolation) {
assertInitializationAllowed();
- switch (v) {
+ switch (defaultTransactionIsolation) {
case Connection.TRANSACTION_NONE:
case Connection.TRANSACTION_READ_COMMITTED:
case Connection.TRANSACTION_READ_UNCOMMITTED:
@@ -658,7 +658,7 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
default:
throw new IllegalArgumentException(BAD_TRANSACTION_ISOLATION);
}
- this.defaultTransactionIsolation = v;
+ this.defaultTransactionIsolation = defaultTransactionIsolation;
}
/**
@@ -675,11 +675,11 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
* Sets the description. This property is defined by JDBC as for use with
GUI (or other) tools that might deploy the
* datasource. It serves no internal purpose.
*
- * @param v
+ * @param description
* Value to assign to description.
*/
- public void setDescription(final String v) {
- this.description = v;
+ public void setDescription(final String description) {
+ this.description = description;
}
protected String getInstanceKey() {
@@ -747,12 +747,12 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
/**
* Sets the value of loginTimeout.
*
- * @param v
+ * @param loginTimeout
* Value to assign to loginTimeout.
*/
@Override
- public void setLoginTimeout(final int v) {
- this.loginTimeout = v;
+ public void setLoginTimeout(final int loginTimeout) {
+ this.loginTimeout = loginTimeout;
}
/**
@@ -771,12 +771,12 @@ public abstract class InstanceKeyDataSource implements
DataSource, Referenceable
/**
* Sets the value of logWriter.
*
- * @param v
+ * @param logWriter
* Value to assign to logWriter.
*/
@Override
- public void setLogWriter(final PrintWriter v) {
- this.logWriter = v;
+ public void setLogWriter(final PrintWriter logWriter) {
+ this.logWriter = logWriter;
}
/**