CatchAndPrintStackTrace
Logging or rethrowing exceptions should usually be preferred to catching and calling printStackTrace

Severity
WARNING

The problem

Discarding an exception after calling printStackTrace should usually be avoided.

try {
  // ...
} catch (IOException e) {
  logger.log(INFO, "something has gone terribly wrong", e);
}
try {
  // ...
} catch (IOException e) {
  throw new UncheckedIOException(e); // New in Java 8
}
try {
  // ...
} catch (IOException e) {
  e.printStackTrace();
}

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("CatchAndPrintStackTrace") to the enclosing element.