<p>
Multiple catch blocks of the appropriate type should be used instead of catching a general exception, and then testing on the type.
</p>

<p>For example, following code:</p>

<pre>
try {
  /* ... */
} catch (Exception e) {
  if(e instanceof IOException) { /* ... */ }         // Non-Compliant
  if(e instanceof NullPointerException{ /* ... */ }  // Non-Compliant
}
</pre>

<p>should be refactored into:</p>

<pre>
try {
  /* ... */
} catch (IOException e) { /* ... */ }                // Compliant
} catch (NullPointerException e) { /* ... */ }       // Compliant
</pre>