code: public static void closeConnection(Connection con) {
          if (con != null) {
              try {
                  con.close();
              } catch (SQLException ex) {
                  logger.debug("Could not close JDBC Connection", ex);
              } catch (Throwable ex) {
                  logger.debug("Unexpected exception on closing JDBC Connection", ex);
              }
          }
      }
docs: Close the given JDBC Connection and ignore any thrown exception.
  This is useful for typical finally blocks in manual JDBC code.
  @param con
  Connection which shall be closed