After I run "Inspect Code..." IDEA says
"Problem synopsis: Condition b at line 8 is always false."
But it could be true.
Timur Zambalayev
=============================================
public class Test {
private boolean b;
private void f() {
b=false;
for (;;) {
if (b) { // line 8
System.out.println("b==true");
break;
}
}
}
private void stop() {
b=true;
}
public static void main(String[] args) {
final Test t=new Test();
new Thread(new Runnable() {
public void run() {
t.f();
}
}).start();
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
new Thread(new Runnable() {
public void run() {
t.stop();
}
}).start();
}
}
=============================================
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list