mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
java: add ThreadSafe query (P3)
Co-authored-by: Raúl Pardo <raul.pardo@protonmail.com> Co-authored-by: SimonJorgensenMancofi <simon.jorgensen@mancofi.dk> Co-authored-by: Bjørnar Haugstad Jåtten <bjornjaat@hotmail.com>
This commit is contained in:
17
java/ql/test/query-tests/ThreadSafe/examples/Test3Super.java
Normal file
17
java/ql/test/query-tests/ThreadSafe/examples/Test3Super.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package examples;
|
||||
|
||||
@ThreadSafe
|
||||
public class Test3Super extends Test2 { // We might want an alert here for the inherited unsafe methods.
|
||||
|
||||
public Test3Super() {
|
||||
super.x = 0;
|
||||
}
|
||||
|
||||
public void y() {
|
||||
super.x = 0; //$ MISSING: Alert
|
||||
}
|
||||
|
||||
public void yLst() {
|
||||
super.lst.add("Hello!"); //$ MISSING: Alert
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user