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); } }