GuardedByChecker - should it take in to account assert Thread.holdsLock()?
Open
- Dominant language
- Java
- Stars
- 7.2k
- Forks
- 820
- Avg merge
- 5h 9m
- Merged PRs (30d)
- 50
Description
Question: should this code:
```
int getValue() {
assert Thread.holdsLock(this);
return this.value;
}
```
ever generate this error:
```
error: [GuardedByChecker] This access should be guarded by 'this', which is not currently held
```
In other words:
- Does error-prone "believe" assertions in the code?
- Does it understand the meaning of `Thread.holdsLock()`?
FYI I filed a [similar issue](https://sourceforge.net/p/findbugs/feature-requests/360/) against FindBugs.
Contributor guide
Assessment
This issue has not been assessed yet.