candidates.removeAll(nested2);
}
- nestedTypes = candidates.isEmpty()? Collections.<ReferenceType>emptyList() : new ArrayList<>(candidates);
+ nestedTypes = candidates.isEmpty() ? Collections.emptyList() : new ArrayList<>(candidates);
}
else {
nestedTypes = Collections.emptyList();
public void threadStarted(ThreadReference thread) {
DebuggerManagerThreadImpl.assertIsManagerThread();
- final Map<ThreadReference, ThreadReferenceProxyImpl> allThreads = myAllThreads;
- if (!allThreads.containsKey(thread)) {
- allThreads.put(thread, new ThreadReferenceProxyImpl(this, thread));
- }
+ getThreadReferenceProxy(thread); // add a proxy
}
public void threadStopped(ThreadReference thread) {
return null;
}
- ThreadReferenceProxyImpl proxy = myAllThreads.get(thread);
- if (proxy == null) {
- proxy = new ThreadReferenceProxyImpl(this, thread);
- myAllThreads.put(thread, proxy);
- }
-
- return proxy;
+ return myAllThreads.computeIfAbsent(thread, t -> new ThreadReferenceProxyImpl(this, t));
}
public ThreadGroupReferenceProxyImpl getThreadGroupReferenceProxy(ThreadGroupReference group) {