Skip to content

Commit 040f857

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: minor updates to CallsToRunnableRun.ql
1 parent a5ee2ae commit 040f857

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

java/ql/src/Likely Bugs/Concurrency/CallsToRunnableRun.ql

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
/**
2-
* @name Direct call to a run() method
2+
* @name Direct call to a 'run()' method
33
* @description Directly calling a 'Thread' object's 'run' method does not start a separate thread
4-
* but executes the method within the current thread.
4+
* but executes the method within the current thread and may indicate misunderstanding
5+
* on the programmer's part.
56
* @kind problem
67
* @problem.severity recommendation
78
* @precision high
89
* @id java/call-to-thread-run
9-
* @tags reliability
10+
* @previous-id java/run-method-called-on-java-lang-thread-directly
11+
* @tags quality
12+
* reliability
1013
* correctness
1114
* concurrency
1215
* external/cwe/cwe-572
1316
*/
1417

1518
import java
1619

20+
/**
21+
* The `run()` method of the class `java.lang.Thread` or
22+
* of its subclasses.
23+
*/
1724
class RunMethod extends Method {
1825
RunMethod() {
1926
this.hasName("run") and

0 commit comments

Comments
 (0)