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-pool.git

commit 7b80fced7169eebf73f4136b146236874d338c81
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jun 22 17:06:36 2024 -0400

    Fix PMD UnnecessaryFullyQualifiedName
---
 src/main/java/org/apache/commons/pool3/impl/PoolImplUtils.java        | 2 +-
 .../org/apache/commons/pool3/impl/ResilientPooledObjectFactory.java   | 4 ++--
 .../java/org/apache/commons/pool3/impl/SoftReferenceObjectPool.java   | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/pool3/impl/PoolImplUtils.java 
b/src/main/java/org/apache/commons/pool3/impl/PoolImplUtils.java
index e5b25037..b15a311b 100644
--- a/src/main/java/org/apache/commons/pool3/impl/PoolImplUtils.java
+++ b/src/main/java/org/apache/commons/pool3/impl/PoolImplUtils.java
@@ -227,7 +227,7 @@ final class PoolImplUtils {
      * @return a Duration.
      */
     static Duration toDuration(final long amount, final TimeUnit timeUnit) {
-        return Duration.of(amount, PoolImplUtils.toChronoUnit(timeUnit));
+        return Duration.of(amount, toChronoUnit(timeUnit));
     }
 
 }
diff --git 
a/src/main/java/org/apache/commons/pool3/impl/ResilientPooledObjectFactory.java 
b/src/main/java/org/apache/commons/pool3/impl/ResilientPooledObjectFactory.java
index e1114de6..c22e40b3 100644
--- 
a/src/main/java/org/apache/commons/pool3/impl/ResilientPooledObjectFactory.java
+++ 
b/src/main/java/org/apache/commons/pool3/impl/ResilientPooledObjectFactory.java
@@ -297,7 +297,7 @@ public class ResilientPooledObjectFactory<T, E extends 
Exception> implements Poo
                 } finally {
                     // Wait for delay
                     try {
-                        Thread.sleep(delay.toMillis());
+                        sleep(delay.toMillis());
                     } catch (InterruptedException e) {
                         killed = true;
                     }
@@ -395,7 +395,7 @@ public class ResilientPooledObjectFactory<T, E extends 
Exception> implements Poo
             while (monitoring && !pool.isClosed()) {
                 runChecks();
                 try {
-                    Thread.sleep(timeBetweenChecks.toMillis());
+                    sleep(timeBetweenChecks.toMillis());
                 } catch (InterruptedException e) {
                     monitoring = false;
                 } catch (Throwable e) {
diff --git 
a/src/main/java/org/apache/commons/pool3/impl/SoftReferenceObjectPool.java 
b/src/main/java/org/apache/commons/pool3/impl/SoftReferenceObjectPool.java
index dc2e11d4..5847697e 100644
--- a/src/main/java/org/apache/commons/pool3/impl/SoftReferenceObjectPool.java
+++ b/src/main/java/org/apache/commons/pool3/impl/SoftReferenceObjectPool.java
@@ -338,7 +338,8 @@ public class SoftReferenceObjectPool<T, E extends 
Exception> extends BaseObjectP
         // Remove wrappers for enqueued references from idle and allReferences 
lists
         removeClearedReferences(idleReferences);
         removeClearedReferences(allReferences);
-        while (refQueue.poll() != null) { // NOPMD
+        while (refQueue.poll() != null) {
+            // loop until null
         }
     }
 

Reply via email to