leventov commented on a change in pull request #8394: 8156 :
StructuralSearchInspection, Prohibit check on Thread.getState()
URL: https://github.com/apache/incubator-druid/pull/8394#discussion_r317390537
##########
File path: .idea/inspectionProfiles/Druid.xml
##########
@@ -311,6 +311,11 @@
<constraint name="k" within="" contains="" />
<constraint name="v" within="" contains="" />
</searchConfiguration>
+ <searchConfiguration name="Prohibit Thread.getState() != TERMINATED
antipattern"
text="while($k$.getDelayedCloseExecutor().getState()!=Thread.State.$k1$){Thread.sleep($k2$)}"
recursive="true" caseInsensitive="true" type="JAVA">
Review comment:
`getDelayedCloseExecutor()` is still too specific. I think the pattern
should just be
```
$t$.getState() == Thread.State.$state$
```
Where the type of `$t$` is filtered as `java.lang.Thread`.
Another pattern is
```
$t$.getState() != Thread.State.$state$
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]