Test, that should fail but it doesn't...

This commit is contained in:
Maxim Shafirov
2011-11-24 21:10:38 +04:00
parent 6d8605d8a3
commit b9b7d146cc
3 changed files with 21 additions and 0 deletions
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<problems />
@@ -0,0 +1,16 @@
import java.util.*;
public class NoWarnings {
public void f() {
int i = 1;
boolean b = true;
while (i < 200) {
if (b && i == 1) { // Warning here: i == 1 is always true, but it is not so.
b = false;
} else {
i++;
}
}
}
}