mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
1. Add "may change semantics" when side-effect cannot be extracted 2. Use condition reporting (instead of constant value reporting) for non-short-circuiting & and | (fixes IDEA-216245) 3. Use SimplifyBooleanExpressionFix for boolean constant value instead of replace fix. GitOrigin-RevId: f3e63a75bd92a7305e36fce58bf9e34bdbb03c51
16 lines
367 B
Java
16 lines
367 B
Java
// "Unwrap 'do-while' statement (may change semantics)" "true"
|
|
import org.jetbrains.annotations.Contract;
|
|
|
|
class X {
|
|
@Contract("_ -> true")
|
|
boolean test(Object obj) {
|
|
return true;
|
|
}
|
|
|
|
void doSmth(Object obj) {
|
|
do {
|
|
System.out.println("aaahh");
|
|
}
|
|
while(obj <caret>!= null && test(obj) && obj == null);
|
|
}
|
|
} |