Hi, I found two false negatives about the rule RSPEC-2252. Please read the following code example:
Case 1
static final int a = 0;
public void foo() {
for(int i = 0; i < a; i++) {} // should report a warning here
}
Case 2
public void foo() {
for(int i = 0; i < 0 + 1 - 1; i++) {} // should report a warning here
}
I think these two cases are hardcoded and literally equivalent with for(int i = 0; i < 0; i++)
. Hence, they are false negatives. Thanks for your consideration.
Version: Latest