Skip to content

Commit 1172f82

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: update existing tests to inline expectations
1 parent e266918 commit 1172f82

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import java.lang.Runnable;
22

33
public 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
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Likely Bugs/Concurrency/CallsToRunnableRun.ql
1+
query: Likely Bugs/Concurrency/CallsToRunnableRun.ql
2+
postprocess: utils/test/InlineExpectationsTestQuery.ql

0 commit comments

Comments
 (0)