mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
don't track state for primitive get* methods for reference-typed methods, track state only inside "if (getX() != null) ..." flush dfa variables on non-pure getter-like calls
21 lines
316 B
Java
21 lines
316 B
Java
class A {
|
|
private String s;
|
|
private int next = 0;
|
|
|
|
public A(final String s) {
|
|
this.s = s;
|
|
}
|
|
|
|
private char getChar() {
|
|
return s.charAt(next++);
|
|
}
|
|
|
|
private void foo() {
|
|
char c = getChar();
|
|
if (c == 'a') {
|
|
if (getChar() == 'b') {
|
|
System.out.println("ab");
|
|
}
|
|
}
|
|
}
|
|
} |