From 204c84243b4b6e1a9a282dd487c9643472dd0180 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Tue, 5 Nov 2013 13:31:01 +0100 Subject: [PATCH] skip locations with lineNumber==1 to fix GWT debugging --- .../com/intellij/debugger/engine/PositionManagerImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/PositionManagerImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/PositionManagerImpl.java index 151fc6f9bb6e..570f6ba3d7b1 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/PositionManagerImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/PositionManagerImpl.java @@ -285,8 +285,11 @@ public class PositionManagerImpl implements PositionManager { int rangeEnd = Integer.MIN_VALUE; for (Location location : fromClass.allLineLocations()) { final int lnumber = location.lineNumber(); - if (lnumber < 1) { - continue; // should be a native method, skipping + if (lnumber <= 1) { + // should be a native method, skipping + // sometimes compiler generates location where line number is exactly 1 (e.g. GWT) + // such locations are hardly correspond to real lines in code, so skipping them too + continue; } final Method method = location.method(); if (method == null || (canGetSynthetic && method.isSynthetic()) || method.isBridge()) {