gianm 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_r317375552
##########
File path: .idea/inspectionProfiles/Druid.xml
##########
@@ -342,6 +342,9 @@
<ignored>
<option name="METHOD_MATCHER_CONFIG"
value="java.io.PrintStream,println,java.io.PrintWriter,println,java.lang.System,identityHashCode,java.sql.PreparedStatement,set.*,java.sql.ResultSet,update.*,java.sql.SQLOutput,write.*,java.lang.Integer,compare.*,java.lang.Long,compare.*,java.lang.Short,compare,java.lang.Byte,compare,java.lang.Character,compare,java.lang.Boolean,compare,java.lang.Math,.*,java.lang.StrictMath,.*"
/>
</ignored>
+ <searchConfiguration name="Prohibit Thread.getState() != TERMINATED
antipattern" text="while (firehose.getDelayedCloseExecutor().getState() !=
Thread.State.TERMINATED) { Thread.sleep(50); }" recursive="true"
caseInsensitive="true" type="JAVA">
Review comment:
I believe this should be inside `SSBasedInspection`. Also, it should be made
more generic. This just flags one specific kind of Thread and one specific
argument to Thread.sleep. I'm not sure what the correct text would be to use
here, but you could try looking at the other SSBasedInspection examples for
ideas.
----------------------------------------------------------------
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]