Skip to content
Permalink
Browse files

add some more known threads

  • Loading branch information...
bobjacobsen committed Dec 31, 2018
1 parent a611112 commit 6b1c98023a4d09bee6e5ec46906f66bdcb903430
Showing with 9 additions and 9 deletions.
  1. +9 −9 java/test/jmri/util/JUnitUtil.java
@@ -7,10 +7,7 @@
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import javax.annotation.Nonnull;
import jmri.*;
import jmri.implementation.JmriConfigurationManager;
@@ -1037,7 +1034,7 @@ public static Thread getThreadByName(String threadName) {
return null;
}

static List<String> threadNames = new ArrayList<>(Arrays.asList(new String[]{
static SortedSet<String> threadNames = new TreeSet<>(Arrays.asList(new String[]{
// names we know about from normal running
"main",
"Java2D Disposer",
@@ -1046,16 +1043,18 @@ public static Thread getThreadByName(String threadName) {
"GC Daemon",
"Finalizer",
"Reference Handler",
"Signal Dispatcher",
"Signal Dispatcher", // POSIX signals in JRE
"Java2D Queue Flusher",
"Time-limited test",
"WindowMonitor-DispatchThread",
"RMI Reaper",
"RMI TCP Accept",
"TimerQueue",
"Java Sound Event Dispatcher",
"Aqua L&F",
"AppKit Thread"
"Aqua L&F", // macOS only
"AppKit Thread",
"JMRI Common Timer",
"BluecoveAsynchronousShutdownThread" // from LocoNet BlueTooth implementation
}));
static List<Thread> threadsSeen = new ArrayList<>();

@@ -1080,7 +1079,8 @@ static void checkThreads() {
|| name.startsWith("Image Fetcher ")
|| name.startsWith("JmDNS(")
|| name.startsWith("SocketListener(")
|| (name.startsWith("Timer-") &&
|| name.startsWith("SocketListener(")
|| (name.startsWith("SwingWorker-pool-1-thread-") &&
( t.getThreadGroup() != null &&
(t.getThreadGroup().getName().contains("FailOnTimeoutGroup") || t.getThreadGroup().getName().contains("main") )
)

0 comments on commit 6b1c980

Please sign in to comment.
You can’t perform that action at this time.