@Override
  public Object intercept(Object o, Method method, Object[] args, MethodProxy proxy)
      throws Throwable {
    Object res;
    try {
      res =
          authenticatedFileIO.doAs(
              () -> {
                try {
                  return proxy.invokeSuper(o, args);
                } catch (Throwable e) {
                  throw new RuntimeException(e);
                }
              });
    } catch (RuntimeException e) {
      throw e.getCause();
    }
    return res;
  }
Using cglib proxy to avoid proxy object having different class
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/interceptor/KerberosInterceptor.java