IDEA-138578 Debugger spuriously jumps to decompiled method signature

This commit is contained in:
Egor.Ushakov
2015-04-14 12:31:28 +03:00
parent 262d580ccc
commit 44ba5816f2
9 changed files with 146 additions and 14 deletions

View File

@@ -58,4 +58,37 @@ public class TestClassLoop {
System.out.println("4");
}
}
public static int testWhileCombined(String in) {
int len = in.length();
int i = 0;
boolean decSeen = false;
boolean signSeen = false;
int decPt = 0;
char c;
int nLeadZero = 0;
int nTrailZero= 0;
skipLeadingZerosLoop:
while (i < len) {
c = in.charAt(i);
if (c == '0') {
nLeadZero++;
} else if (c == '.') {
if (decSeen) {
// already saw one ., this is the 2nd.
throw new NumberFormatException("multiple points");
}
decPt = i;
if (signSeen) {
decPt -= 1;
}
decSeen = true;
} else {
break skipLeadingZerosLoop;
}
i++;
}
return decPt;
}
}