code: private static RuntimeException getCause(InvocationTargetException e) {
          Throwable cause = e.getCause();
          if(cause instanceof RuntimeException)
              throw (RuntimeException) cause;
          else
              throw new IllegalArgumentException(e.getCause());
      }
docs: Get the root cause of the Exception
  
  @param e The Exception
  @return The root cause of the Exception