code: @NullSafe
    @SuppressWarnings("all")
    public static Throwable getRootCause(Throwable throwable) {
      while (getCause(throwable) != null) {
        throwable = throwable.getCause();
      }
  
      return throwable;
    }
docs: Determines the original, root cause of the given {@link Throwable} object.
  
  @param throwable {@link Throwable} object who's root cause will be determined.
  @return a {@link Throwable} object indicating the root cause of the given {@link Throwable} object,
  or {@literal null} if the {@link Throwable} object reference is {@literal null}.
  @see java.lang.Throwable#getCause()