From e76af49fc2417c6d78551ee96c72d865681f18f4 Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Fri, 28 Oct 2016 15:45:35 +0300 Subject: [PATCH] use StreamEx.ofTree --- .../intellij/debugger/ui/breakpoints/MethodBreakpoint.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java index 2032b41dc268..8727d201f606 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/MethodBreakpoint.java @@ -510,10 +510,6 @@ public class MethodBreakpoint extends BreakpointWithHighlighter consumer) { MultiMap inheritance = new MultiMap<>(); classType.virtualMachine().allClasses().forEach(type -> supertypes(type).forEach(st -> inheritance.putValue(st, type))); - subtypes(classType, inheritance).forEach(consumer); - } - - private static Stream subtypes(ReferenceType type, MultiMap inheritance) { - return StreamEx.of(type).append(StreamEx.of(inheritance.get(type)).flatMap(t -> subtypes(t, inheritance))); + StreamEx.ofTree(classType, t -> StreamEx.of(inheritance.get(t))).forEach(consumer); } }