do not set unneeded breakpoints on bridge methods in anonymous classes

This commit is contained in:
Egor.Ushakov
2015-09-03 15:33:00 +03:00
parent 4f9e386d6b
commit dec966fc04
@@ -203,8 +203,9 @@ public class LineBreakpoint<P extends JavaBreakpointProperties> extends Breakpoi
Method method = loc.method();
// Some frameworks may create synthetic methods with lines mapped to user code, see IDEA-143852
// if (DebuggerUtils.isSynthetic(method)) { return false; }
boolean res = !(method.isConstructor() && loc.codeIndex() == 0 && isAnonymousClass(classType));
if (!res) return false;
if (isAnonymousClass(classType)) {
if ((method.isConstructor() && loc.codeIndex() == 0) || method.isBridge()) return false;
}
return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
@Override
public Boolean compute() {