You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/05 08:41:52 UTC

[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #305: HDDS-2578. Handle InterruptedException in RandomKeyGenerator

adoroszlai commented on a change in pull request #305: HDDS-2578. Handle InterruptedException in RandomKeyGenerator
URL: https://github.com/apache/hadoop-ozone/pull/305#discussion_r354169397
 
 

 ##########
 File path: hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java
 ##########
 @@ -1062,6 +1062,9 @@ public void run() {
           }
         } catch (IOException | InterruptedException ex) {
           LOG.error("Exception while validating write: " + ex.getMessage());
+          if(ex instanceof InterruptedException) {
 
 Review comment:
   The `instanceof` check triggers another warning:
   
   > Exception types should not be tested using "instanceof" in catch blocks
   >
   > Code smell    Major    squid:S1193
   >
   > Multiple catch blocks of the appropriate type should be used instead of catching a general exception, and then testing on the type.

----------------------------------------------------------------
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: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org