code: @GwtIncompatible("incompatible method")
      public static Throwable getRootCause(final Throwable throwable) {
          final List<Throwable> list = getThrowableList(throwable);
          return list.size() < 2 ? null : list.get(list.size() - 1);
      }
docs: <p>Introspects the <code>Throwable</code> to obtain the root cause.</p>
  
  <p>This method walks through the exception chain to the last element,
  "root" of the tree, using {@link Throwable#getCause()}, and
  returns that exception.</p>
  
  <p>From version 2.2, this method handles recursive cause structures
  that might otherwise cause infinite loops. If the throwable parameter
  has a cause of itself, then null will be returned. If the throwable
  parameter cause chain loops, the last element in the chain before the
  loop is returned.</p>
  
  @param throwable  the throwable to get the root cause for, may be null
  @return the root cause of the <code>Throwable</code>,
  <code>null</code> if none found or null throwable input