< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/ui/JavaThreadsPanel.java

Print this page
rev 54717 : imported patch 8223306

@@ -457,16 +457,15 @@
         crashed.ifPresent(this::showThreadStackMemory);
         return crashed.isPresent();
     }
 
     private void cache() {
-        Threads threads = VM.getVM().getThreads();
-        for (JavaThread t = threads.first(); t != null; t = t.next()) {
+        VM.getVM().getThreads().doJavaThreads((t) -> {
             if (t.isJavaThread()) {
                 cachedThreads.add(new CachedThread(t));
             }
-        }
+        });
     }
 
     private void decache() {
         cachedThreads.clear();
     }
< prev index next >