code: protected final void abortIfNeeded() {
          if (shouldAbort()) {
              try {
                  abort();    // execute subclass specific abortion logic
              } catch (IOException e) {
                  LogFactory.getLog(getClass()).debug("FYI", e);
              }
              throw new AbortedException();
          }
      }
docs: Aborts with subclass specific abortion logic executed if needed.
  Note the interrupted status of the thread is cleared by this method.
  @throws AbortedException if found necessary.