Files
openide/java/java-tests/testData/refactoring/extractMethod/NullableCheckBreak_after.java
Mikhail Pyltsin 36f87ac0b6 [java] IDEA-354964 Migrate standard descriptors like JAVA_21 to TYPE_USE annotations
- fix tests
- fixes to show external annotations

GitOrigin-RevId: 79cde38663de10c2985b72e76e98372fef214b20
2024-06-26 20:34:48 +00:00

33 lines
518 B
Java

import org.jetbrains.annotations.Nullable;
import java.util.List;
class Test {
List<Pojo> things;
void foo() {
while(true) {
Pojo x = newMethod();
if (x == null) break;
System.out.println(x.it);
}
}
@Nullable
private Test.Pojo newMethod() {
Pojo x = things.get(0);
if(x.it > 0) {
return null;
}
things.remove(x);
return x;
}
static class Pojo {
double it;
Pojo(double w) {
it = w;
}
}
}