You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/09/20 02:11:25 UTC
[commons-io] 05/09: Inline a single use variable.
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-io.git
commit f70a18f58e44241bfe684e8794b98454c772db0c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Sep 19 21:59:39 2021 -0400
Inline a single use variable.
---
src/main/java/org/apache/commons/io/ThreadMonitor.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/io/ThreadMonitor.java b/src/main/java/org/apache/commons/io/ThreadMonitor.java
index 0aa6fdc..897d445 100644
--- a/src/main/java/org/apache/commons/io/ThreadMonitor.java
+++ b/src/main/java/org/apache/commons/io/ThreadMonitor.java
@@ -65,8 +65,7 @@ class ThreadMonitor implements Runnable {
if (timeout.isZero() || timeout.isNegative()) {
return null;
}
- final ThreadMonitor timout = new ThreadMonitor(thread, timeout);
- final Thread monitor = new Thread(timout, ThreadMonitor.class.getSimpleName());
+ final Thread monitor = new Thread(new ThreadMonitor(thread, timeout), ThreadMonitor.class.getSimpleName());
monitor.setDaemon(true);
monitor.start();
return monitor;