public static Object invokeUnchecked()

in hadoop-api-shim/src/main/java/org/apache/hadoop/fs/shim/impl/ShimReflectionSupport.java [227:250]


  public static Object invokeUnchecked(
      String operation,
      Object instance,
      Method method,
      Object... parameters) {
    if (method == null) {
      throw new UnsupportedOperationException("No " +
          operation + " in " + instance);
    }
    try {
      return method.invoke(instance, parameters);
    }  catch (InvocationTargetException e) {
      final Throwable cause = e.getCause();
      if (cause instanceof RuntimeException) {
        throw (RuntimeException)cause;
      } else if (cause instanceof IOException) {
        throw new UncheckedIOException((IOException) cause);
      } else {
        throw new RuntimeException(cause);
      }
    } catch (IllegalAccessException e) {
      throw new RuntimeException(e);
    }
  }