code: public void printStackTrace(PrintStream s) {
          if (!isJDK14OrAbove && causeOnJDK13OrBelow != null) {
              printStackTrace0(new PrintWriter(s));
          }
          else {
              super.printStackTrace(s);
          }
      }
docs: Print the the trace of methods from where the error
  originated.  This will trace all nested exception
  objects, as well as this object.
  @param s The stream where the dump will be sent to.