Skip to content

Commit f88681a

Browse files
committed
Reuse BasicThreadFactory
1 parent 9b7809a commit f88681a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
// TODO Add a Builder so we can construct and start.
8080
public class DefaultFileMonitor implements Runnable, FileMonitor, AutoCloseable {
8181

82-
private static final ThreadFactory threadFactory = new BasicThreadFactory.Builder().daemon(true).priority(Thread.MIN_PRIORITY).build();
82+
private static final ThreadFactory THREAD_FACTORY = new BasicThreadFactory.Builder().daemon(true).priority(Thread.MIN_PRIORITY).build();
8383

8484
/**
8585
* File monitor agent.
@@ -560,7 +560,7 @@ public void setRecursive(final boolean newRecursive) {
560560
*/
561561
public synchronized void start() {
562562
if (monitorThread == null) {
563-
monitorThread = threadFactory.newThread(this);
563+
monitorThread = THREAD_FACTORY.newThread(this);
564564
}
565565
monitorThread.start();
566566
}

0 commit comments

Comments
 (0)