This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-pool.git
The following commit(s) were added to refs/heads/master by this push:
new 1ca05d0 Fix a couple of IDE nags to the code is clean in my IDE
1ca05d0 is described below
commit 1ca05d01e526efa7564ab54e98a6d6b737463437
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Jul 9 19:43:00 2020 +0100
Fix a couple of IDE nags to the code is clean in my IDE
---
src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java | 9 +++++----
src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java
b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java
index 9fa96d5..60928ef 100644
--- a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java
+++ b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java
@@ -64,10 +64,11 @@ class EvictionTimer {
/**
- * Adds the specified eviction task to the timer. Tasks that are added
with a
- * call to this method *must* call {@link #cancel()} to cancel the
- * task to prevent memory and/or thread leaks in application server
- * environments.
+ * Adds the specified eviction task to the timer. Tasks that are added with
+ * a call to this method *must* call {@link
+ * #cancel(org.apache.commons.pool2.impl.BaseGenericObjectPool.Evictor,
long, TimeUnit)}
+ * to cancel the task to prevent memory and/or thread leaks in application
+ * server environments.
*
* @param task Task to be scheduled.
* @param delay Delay in milliseconds before task is executed.
diff --git a/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java
b/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java
index 94ae100..71ee1b7 100644
--- a/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java
+++ b/src/main/java/org/apache/commons/pool2/impl/PoolImplUtils.java
@@ -48,7 +48,7 @@ class PoolImplUtils {
// A bit hackish, but we must handle cases when getGenericType()
does not return a concrete types.
final ParameterizedType pi = getParameterizedType(type,
factoryClass);
if (pi != null) {
- final Type[] bounds = ((TypeVariable)
pi.getActualTypeArguments()[(Integer) genericType]).getBounds();
+ final Type[] bounds = ((TypeVariable)
pi.getActualTypeArguments()[((Integer) genericType).intValue()]).getBounds();
if (bounds != null && bounds.length > 0) {
final Type bound0 = bounds[0];
if (bound0 instanceof Class) {