You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/04/02 12:17:56 UTC

[GitHub] [incubator-druid] kamaci commented on a change in pull request #6943: InterruptedExceptions should never be ignored in the code.

kamaci commented on a change in pull request #6943: InterruptedExceptions should never be ignored in the code.
URL: https://github.com/apache/incubator-druid/pull/6943#discussion_r271271973
 
 

 ##########
 File path: core/src/main/java/org/apache/druid/java/util/http/client/pool/ResourcePool.java
 ##########
 @@ -186,7 +186,7 @@ V get()
             this.wait();
           }
           catch (InterruptedException e) {
-            Thread.interrupted();
 
 Review comment:
   I mean we do not forbid to use Thread.interrupted() i.e. these are valid usages:
   
         boolean needsToShutdown = Thread.interrupted() || shuttingDown;
         ...
         if (Thread.interrupted()) {
           throw new InterruptedException();
         }
   
   It can be assigned to a variable or can be used within an `if` condition. So, we should only prohibit to use it without assigning to a variable or not using inside an `if` condition.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org