CompletableFuture<Icon> (ThreadReferenceProxyImpl threadProxy, boolean current) { ThreadReference ref = threadProxy.getThreadReference(); if (!DebuggerUtilsAsync.isAsyncEnabled() || !(ref instanceof ThreadReferenceImpl threadReference)) { return CompletableFuture.completedFuture(calcIcon(threadProxy, current)); } if (current) { return calcThreadIconAsync(threadReference, true); } return threadReference.isAtBreakpointAsync().thenCompose(r -> { if (r) { return CompletableFuture.completedFuture(AllIcons.Debugger.ThreadAtBreakpoint); } else { return calcThreadIconAsync(threadReference, false); } }); }