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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to