Files
openide/java/java-tests/testData/inspection/dataFlow/fixture/WidenMulInLoop.java
Tagir Valeev c79e23a713 Dataflow refactoring: DfaFactMap => DfType
GitOrigin-RevId: 3ef9e633dc92929191cc5724109b3575bf6d12a1
2019-12-11 09:07:22 +00:00

28 lines
691 B
Java

import java.util.*;
public class WidenMulInLoop {
void test1() {
for (int i = 0; <warning descr="Condition 'i < Integer.MAX_VALUE' is always 'true'">i < Integer.MAX_VALUE</warning>; <warning descr="Variable update does nothing">i</warning> *= 3) {
System.out.println(i);
}
}
void test2() {
for (int i = 1; <warning descr="Condition 'i < Integer.MAX_VALUE' is always 'true'">i < Integer.MAX_VALUE</warning>; i *= 2) {
System.out.println(i);
}
}
void test3() {
for (int i = 1; i < Integer.MAX_VALUE; i *= 3) {
System.out.println(i);
}
}
void test4(int b, int c) {
for (int i = 1; i < 100; i++) {
b = i * b / c;
}
}
}