mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-23 16:20:55 +07:00
pessimistic approach for now: even if the condition consists of array access only; do not depend on the order of found references GitOrigin-RevId: 0d111aad6b69729404183520d1f4d01cba583a1c
25 lines
604 B
Java
25 lines
604 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class DeclaredOutputVariable {
|
|
void foo(String[] a, int j) {
|
|
|
|
String s = newMethod(a, j, 1, "X");
|
|
if (s == null) return;
|
|
|
|
System.out.println(s.length());
|
|
}
|
|
|
|
@Nullable
|
|
private String newMethod(String[] a, int j, int i, String x) {
|
|
if (a[j] == null) return null;
|
|
String s = a[j];
|
|
System.out.println(s.charAt(i) + x);
|
|
return s;
|
|
}
|
|
|
|
void bar(String[] a, int k) {
|
|
String s = newMethod(a, k, 2, "Y");
|
|
if (s == null) return;
|
|
System.out.println(s.length());
|
|
}
|
|
} |