Files
Tagir Valeevandintellij-monorepo-bot 0b71b70cdc IDEA-242220 Infer mutation signature from source
GitOrigin-RevId: 8d69b91a86cbc228935ee8906201d3597af961f5
2020-06-01 09:32:04 +03:00

16 lines
362 B
Java

import java.util.List;
final class MainTest {
int x = 0;
void increment() {
x++;
}
void test(List<String> list) {
if (list.isEmpty()) return;
increment(); // mutates this, so should not flush list
if (<warning descr="Condition 'list.isEmpty()' is always 'false'">list.isEmpty()</warning>) return;
System.out.println("hello");
}
}