IDEA-121202 Step Into doesn't step into a lambda

This commit is contained in:
Egor.Ushakov
2014-02-25 18:57:37 +04:00
parent 1be8e04838
commit 5e2bf99324
2 changed files with 5 additions and 2 deletions
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
* Date: 10/26/13
*/
public class LambdaMethodFilter implements BreakpointStepMethodFilter{
private static final String LAMBDA_METHOD_PREFIX = "lambda$";
public static final String LAMBDA_METHOD_PREFIX = "lambda$";
private final int myLambdaOrdinal;
@Nullable
private final SourcePosition myFirstStatementPosition;
@@ -188,7 +188,10 @@ public class RequestHint {
final Method method = location.method();
if (method != null) {
if (myVirtualMachineProxy.canGetSyntheticAttribute()? method.isSynthetic() : method.name().indexOf('$') >= 0) {
return myDepth;
// step into lambda methods
if (!method.name().startsWith(LambdaMethodFilter.LAMBDA_METHOD_PREFIX)) {
return myDepth;
}
}
}
}