Files
Mikhail Pyltsin 8579ca0616 [java-inspections] IDEA-318681, IDEA-318678, IDEA-318677, IDEA-318676 Improve tainted analysis
GitOrigin-RevId: 93ef8d87e4dadd2b5cbfcc16b91610503df95664
2023-05-05 16:37:48 +00:00

27 lines
457 B
Java

import org.checkerframework.checker.tainting.qual.*;
class Simple {
void test() {
String s = callAnother();
sink(<caret>s);
}
String callAnother() {
Another another = new Another();
return ((another.foo()) + (another.foo()));
}
static String bar(x) {
return x;
}
void sink(@Untainted String s) {}
}
class Another {
String x;
String foo() {
return Simple.bar(x);
}
}