Why is this an issue?

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

Noncompliant code example

try {
  /* ... */
} catch (Exception e) {
  if(e instanceof IOException) { /* ... */ }         // Noncompliant
  if(e instanceof NullPointerException{ /* ... */ }  // Noncompliant
}

Compliant solution

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

Resources