google / google/error-prone

error: [DoNotCall] Calling run on Thread runs work on this thread

Open
#4,141 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

Sample code:

```java
class TThread extends Thread {
@Override
public void run() {
this.run();
}
}
```

Use cases:
Thread hasn't finished processing (maybe there was an error, and the programmer wants to retry, maybe it only incrementally does stuff, and notifies a consumer about the new data, etc.).

With that said, `DoNotCall` should probably ignore recursive calls instead of special-casing `Thread`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.