Skip to content

Commit b08e5b1

Browse files
nettozahlerjukzi
authored andcommitted
Bugfix for #518 (Setting a breakpoint inside lambda with object).
1 parent d0eebee commit b08e5b1

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

org.eclipse.jdt.debug.tests/java8/ClassWithLambdas.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2024 IBM Corporation and others.
2+
* Copyright (c) 2024 Christian Schima.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0

org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,14 +1067,8 @@ public boolean visit(LambdaExpression node) {
10671067
}
10681068
}
10691069

1070-
// Lambda body can be a block (which is handled above) or an (arbitrary) expression. So maybe the
1071-
// following cases are insufficient and should be replaced by handling the general
1072-
// org.eclipse.jdt.core.dom.Expression.
1073-
} else if (body instanceof LambdaExpression) {
1074-
body.accept(this);
1075-
} else if (body instanceof MethodInvocation) {
1076-
body.accept(this);
1077-
} else if (body instanceof ClassInstanceCreation) {
1070+
// Lambda body can be a block (which is handled above) or an (arbitrary) expression.
1071+
} else if (body instanceof Expression) {
10781072
body.accept(this);
10791073
}
10801074
}

0 commit comments

Comments
 (0)