skip locations with lineNumber==1 to fix GWT debugging

This commit is contained in:
Eugene Zhuravlev
2013-11-05 13:33:44 +01:00
parent 1b92d0c172
commit 204c84243b
@@ -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()) {