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 11import java .lang .Runnable ;
22
33public class CallsToRunnableRun extends Thread implements Runnable {
4-
4+
55 private Thread wrapped ;
66 private Runnable callback ;
7-
7+
88 @ Override
99 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
1212 }
13-
13+
1414 public void bad () {
15- wrapped .run ();
16- callback .run ();
15+ wrapped .run (); // $ Alert
16+ callback .run (); // COMPLIANT: called on a `Runnable` object
1717 }
1818}
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