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 1ff0aa0 Javadoc and PMD. 1ff0aa0 is described below commit 1ff0aa0f058b138fd719e856f419796bf4e4d1fe Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Wed Jul 24 16:44:38 2019 -0400 Javadoc and PMD. --- .../apache/commons/pool2/impl/EvictionTimer.java | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 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 43904b7..8ab6435 100644 --- a/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java +++ b/src/main/java/org/apache/commons/pool2/impl/EvictionTimer.java @@ -18,7 +18,6 @@ package org.apache.commons.pool2.impl; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.TimerTask; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory; @@ -47,7 +46,7 @@ class EvictionTimer { /** Executor instance */ private static ScheduledThreadPoolExecutor executor; //@GuardedBy("EvictionTimer.class") - /** Prevent instantiation */ + /** Prevents instantiation */ private EvictionTimer() { // Hide the default constructor } @@ -65,14 +64,14 @@ class EvictionTimer { /** - * Add the specified eviction task to the timer. Tasks that are added with a - * call to this method *must* call {@link #cancel(TimerTask)} to cancel the + * 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. * - * @param task Task to be scheduled - * @param delay Delay in milliseconds before task is executed - * @param period Time in milliseconds between executions + * @param task Task to be scheduled. + * @param delay Delay in milliseconds before task is executed. + * @param period Time in milliseconds between executions. */ static synchronized void schedule( final BaseGenericObjectPool<?>.Evictor task, final long delay, final long period) { @@ -86,13 +85,13 @@ class EvictionTimer { } /** - * Remove the specified eviction task from the timer. + * Removes the specified eviction task from the timer. * - * @param evictor Task to be cancelled + * @param evictor Task to be cancelled. * @param timeout If the associated executor is no longer required, how * long should this thread wait for the executor to * terminate? - * @param unit The units for the specified timeout + * @param unit The units for the specified timeout. */ static synchronized void cancel( final BaseGenericObjectPool<?>.Evictor evictor, final long timeout, final TimeUnit unit) { @@ -120,7 +119,7 @@ class EvictionTimer { @Override public Thread newThread(final Runnable runnable) { final Thread thread = new Thread(null, runnable, "commons-pool-evictor-thread"); - thread.setDaemon(true); // POOL-363 - Required for applications using Runtime.addShutdownHook(). --joshlandin 03.27.2019 + thread.setDaemon(true); // POOL-363 - Required for applications using Runtime.addShutdownHook(). AccessController.doPrivileged(new PrivilegedAction<Void>() { @Override public Void run() {