Files
codeql/java/ql/test/library-tests/dataflow/partial/A.java
Anders Schack-Mulligen 6582734733 Java: Add test.
2019-08-30 14:32:55 +02:00

26 lines
346 B
Java

public class A {
static void sink(Object o) { }
static class Box {
public Object elem;
}
static Object src() { return new Object(); }
Box f1() {
Box b = new Box();
b.elem = src();
return b;
}
void f2() {
Box b = f1();
f3(b);
}
void f3(Box b) {
Box other = new Box();
sink(other.elem);
}
}