From 8133adf5cad79bf443be847da5da71bd9d51a2d0 Mon Sep 17 00:00:00 2001 From: Christian Schima Date: Tue, 1 Oct 2024 15:22:55 +0200 Subject: [PATCH] Bugfix for #518 (Setting a breakpoint inside lambda with object). --- .../core/breakpoints/ValidBreakpointLocationLocator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java index a27b230f62..40eb3df37d 100644 --- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java +++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java @@ -1066,10 +1066,16 @@ public boolean visit(LambdaExpression node) { } } + + // Lambda body can be a block (which is handled above) or an (arbitrary) expression. So maybe the + // following cases are insufficient and should be replaced by handling the general + // org.eclipse.jdt.core.dom.Expression. } else if (body instanceof LambdaExpression) { body.accept(this); } else if (body instanceof MethodInvocation) { body.accept(this); + } else if (body instanceof ClassInstanceCreation) { + body.accept(this); } } return false;