mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
25 lines
377 B
Java
25 lines
377 B
Java
import org.checkerframework.checker.tainting.qual.*;
|
|
|
|
class Simple {
|
|
|
|
@Untainted String field = "safe";
|
|
|
|
void test() {
|
|
String s = foo();
|
|
sink(<caret>s);
|
|
}
|
|
|
|
@Untainted String foo() {
|
|
return field;
|
|
}
|
|
|
|
void setFieldToSource() {
|
|
this.field = source();
|
|
}
|
|
|
|
@Tainted String source() {
|
|
return "unsafe";
|
|
}
|
|
|
|
void sink(@Untainted String s) {}
|
|
} |