Structural search inspection: incorrect try-finally locking pattern
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
This [structural search pattern](https://github.com/apache/incubator-druid/blob/master/dev/teamcity.md#creating-a-custom-inspection-from-a-structural-search-pattern):
```
try {
$x$.lock();
$Statement$;
}
```
Where `$Statement$` has `Count` filter from 0 to "unlimited", allows to catch bad locking patterns, first noticed by @clintropolis here: https://github.com/apache/incubator-druid/pull/7547/files#r294553352
Contributor guide
Research direction
Start with dev/teamcity.md and the structural search pattern shown in the issue, then review the referenced discussion in PR 7547. Determine what locking pattern the inspection should identify and update the inspection guidance or pattern so that the intended bad pattern is detected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100