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


The following commit(s) were added to refs/heads/master by this push:
     new 8f62ffc  Let Checkstyle run standalone and address Checktyle issues.
8f62ffc is described below

commit 8f62ffce9406e50b67e5eec259cba17c82a64afa
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 26 09:59:34 2020 -0400

    Let Checkstyle run standalone and address Checktyle issues.
---
 pom.xml                                                | 18 +++++++++++-------
 .../org/apache/commons/pool2/impl/EvictionTimer.java   | 12 ++++++++++--
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/pom.xml b/pom.xml
index 7a58316..dfa25ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -193,7 +193,7 @@
   </properties> 
 
   <build>
-      <defaultGoal>clean verify apache-rat:check japicmp:cmp 
javadoc:javadoc</defaultGoal>
+      <defaultGoal>clean verify apache-rat:check checkstyle:check japicmp:cmp 
javadoc:javadoc</defaultGoal>
       <pluginManagement>
         <plugins>
           <plugin>
@@ -229,6 +229,16 @@
               </dependency>
             </dependencies>
           </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-checkstyle-plugin</artifactId>
+            <version>3.0.0</version>
+            <configuration>
+              <configLocation>${basedir}/checkstyle.xml</configLocation>
+              <enableRulesSummary>false</enableRulesSummary>
+              <headerLocation>${basedir}/license-header.txt</headerLocation>
+            </configuration>
+          </plugin>
         </plugins>
       </pluginManagement>
       <plugins>
@@ -334,12 +344,6 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-checkstyle-plugin</artifactId>
-          <version>3.0.0</version>
-          <configuration>
-            <configLocation>${basedir}/checkstyle.xml</configLocation>
-            <enableRulesSummary>false</enableRulesSummary>
-            <headerLocation>${basedir}/license-header.txt</headerLocation>
-          </configuration>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
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 eb0c0ba..72d8333 100644
--- a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java
+++ b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java
@@ -20,7 +20,6 @@ import java.lang.ref.WeakReference;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map.Entry;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
@@ -104,6 +103,7 @@ class EvictionTimer {
      *                  long should this thread wait for the executor to
      *                  terminate?
      * @param unit      The units for the specified timeout.
+     * @param restarting The state of the evictor.
      */
     static synchronized void cancel(
             final BaseGenericObjectPool<?>.Evictor evictor, final long 
timeout, final TimeUnit unit, final boolean restarting) {
@@ -195,10 +195,18 @@ class EvictionTimer {
      * no longer reachable, run is no-op.
      */
     private static class WeakRunner implements Runnable {
+
         private final WeakReference<Runnable> ref;
-        public WeakRunner(WeakReference<Runnable> ref) {
+
+        /**
+         * Constructs a new instance to track the given reference.
+         *
+         * @param ref the reference to track.
+         */
+        private WeakRunner(WeakReference<Runnable> ref) {
            this.ref = ref;
         }
+
         @Override
         public void run() {
             final Runnable task = ref.get();

Reply via email to