AbstractConfigTest.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:hashsdn-controller 作者:
/**
 * Expand inner exception wrapped by JMX.
 *
 * @param innerObject
 *            jmx proxy which will be wrapped and returned
 */
protected <T> T rethrowCause(final T innerObject) {
    @SuppressWarnings("unchecked")
    final T proxy = (T) Proxy.newProxyInstance(innerObject.getClass().getClassLoader(),
            innerObject.getClass().getInterfaces(), (proxy1, method, args) -> {
            try {
                return method.invoke(innerObject, args);
            } catch (final InvocationTargetException e) {
                try {
                    throw e.getTargetException();
                } catch (final RuntimeMBeanException e2) {
                    throw e2.getTargetException();
                }
            }
        });
    return proxy;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号