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 b6b253e Javadoc and minor bullet-proofing. b6b253e is described below commit b6b253e4a4b4dce3eec7dfcff5089407462843a2 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Tue Jul 30 16:09:23 2019 -0400 Javadoc and minor bullet-proofing. --- .../dbcp2/cpdsadapter/DriverAdapterCPDS.java | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 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 e80d69c..d039a49 100644 --- a/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java +++ b/src/main/java/org/apache/commons/dbcp2/cpdsadapter/DriverAdapterCPDS.java @@ -146,7 +146,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl } /** - * Attempt to establish a database connection. + * Attempts to establish a database connection. * * @param pooledUserName * name to be used for the connection @@ -213,11 +213,8 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl throw new SQLFeatureNotSupportedException(); } - // ---------------------------------------------------------------------- - // Referenceable implementation - /** - * <CODE>Referenceable</CODE> implementation. + * Implements {@link Referenceable}. */ @Override public Reference getReference() throws NamingException { @@ -243,11 +240,8 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl return ref; } - // ---------------------------------------------------------------------- - // ObjectFactory implementation - /** - * implements ObjectFactory to create an instance of this class + * Implements {@link ObjectFactory} to create an instance of this class */ @Override public Object getObjectInstance(final Object refObj, final Name name, final Context context, @@ -328,9 +322,6 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl } } - // ---------------------------------------------------------------------- - // Properties - /** * Gets the connection properties passed to the JDBC driver. * @@ -547,11 +538,8 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl logWriter = out; } - // ------------------------------------------------------------------ - // PreparedStatement pool properties - /** - * Flag to toggle the pooling of <code>PreparedStatement</code>s + * Whether to toggle the pooling of <code>PreparedStatement</code>s * * @return value of poolPreparedStatements. */ @@ -560,7 +548,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl } /** - * Flag to toggle the pooling of <code>PreparedStatement</code>s + * Whether to toggle the pooling of <code>PreparedStatement</code>s * * @param poolPreparedStatements * true to pool statements. @@ -722,7 +710,7 @@ public class DriverAdapterCPDS implements ConnectionPoolDataSource, Referenceabl } private void update(final Properties properties, final String key, final String value) { - if (properties != null) { + if (properties != null && key != null) { if (value == null) { properties.remove(key); } else {