The following test case causes verification errors. This is the simplest
possible test case to recreate the issue.
public class BugDemo {
int jj_ntk;
public static void main(String[] args) {
BugDemo bd = new BugDemo();
bd.jj_ntk = args.length;
bd.foo();
}
final public void foo(){
while (true) {
int i =0;
switch (jj_ntk) {
case 1:
break;
default: ;
}
break;
}
switch (jj_ntk) {
case 1:
A j2 = (A)A.create(this);
break;
default:
swap();
}
}
public int jj_ntk() {
return jj_ntk;
}
public void swap() {
jj_ntk = (jj_ntk == 1)? 0:1;
}
}
class A {
public static A create(Object obj) {
return new A();
}
}