mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 21:50:54 +07:00
[extract method] IDEA-251837 fix texts GitOrigin-RevId: 37da2e7e8f83a4d85a87c644788a66ce6ea1e05f
20 lines
420 B
Java
20 lines
420 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class C {
|
|
private int[] list;
|
|
|
|
private int find(int id) {
|
|
Integer n = newMethod(id);
|
|
if (n != null) return n;
|
|
throw new RuntimeException();
|
|
}
|
|
|
|
private @Nullable Integer newMethod(int id) {
|
|
for (int n : list) {
|
|
if (n == id) {
|
|
return n <= 0 ? 0 : n;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
} |