boolean printThread()

in src/main/java/org/apache/sling/commons/threaddump/internal/BaseThreadDumper.java [27:42]


    boolean printThread(PrintWriter pw, long threadId, boolean withStackTrace) {
        // first get the root thread group
        ThreadGroup rootGroup = getRootThreadGroup();
        int numThreads = rootGroup.activeCount();
        Thread[] threads = new Thread[numThreads * 2];
        rootGroup.enumerate(threads);

        for (Thread thread : threads) {
            if (thread != null && thread.getId() == threadId) {
                printThread(pw, thread, withStackTrace);
                return true;
            }
        }

        return false;
    }