Inline a single use variable.
MODIFY
src/main/java/org/apache/commons/io/ThreadMonitor.java
src/main/java/org/apache/commons/io/ThreadMonitor.java
@@ -65,8 +65,7 @@ static Thread start(final Thread thread, final Duration timeout) {
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;

Inline a single use variable.