File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
java/ql/test/query-tests/CallsToRunnableRun Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
import java .lang .Runnable ;
2
2
3
3
public class CallsToRunnableRun extends Thread implements Runnable {
4
-
4
+
5
5
private Thread wrapped ;
6
6
private Runnable callback ;
7
-
7
+
8
8
@ Override
9
9
public void run () {
10
- wrapped .run ();
11
- callback .run ();
10
+ wrapped .run (); // COMPLIANT: called within a `run` method
11
+ callback .run (); // COMPLIANT: called within a `run` method
12
12
}
13
-
13
+
14
14
public void bad () {
15
- wrapped .run ();
16
- callback .run ();
15
+ wrapped .run (); // $ Alert
16
+ callback .run (); // COMPLIANT: called on a `Runnable` object
17
17
}
18
18
}
Original file line number Diff line number Diff line change 1
- Likely Bugs/Concurrency/CallsToRunnableRun.ql
1
+ query: Likely Bugs/Concurrency/CallsToRunnableRun.ql
2
+ postprocess: utils/test/InlineExpectationsTestQuery.ql
You can’t perform that action at this time.
0 commit comments