@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object>() { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object>() { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }
@Override public Object invoke(Object arg0, final Method method, final Object[] args) throws Throwable { try { if (method.getDeclaringClass() == HiveSessionBase.class) { return invoke(method, args); } return ugi.doAs( new PrivilegedExceptionAction<Object> () { @Override public Object run() throws HiveSQLException { return invoke(method, args); } }); } catch (UndeclaredThrowableException e) { Throwable innerException = e.getCause(); if (innerException instanceof PrivilegedActionException) { throw innerException.getCause(); } else { throw e.getCause(); } } }