@Override public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = true; try { delegate = findDelegate(name); authorizeMBeanOperation(delegate, name, GET_ATTRIBUTE, attribute, JmxAction.Impact.READ_ONLY); return delegate.getAttribute(name, attribute); } catch (Exception e) { error = e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof AttributeNotFoundException) throw (AttributeNotFoundException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; if (e instanceof ReflectionException) throw (ReflectionException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).getAttribute(name, attribute); } } }
@Override public Object getAttribute(ObjectName name, String attribute) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException { Throwable error = null; MBeanServerPlugin delegate = null; final boolean readOnly = true; try { delegate = findDelegate(name); if (delegate.shouldAuthorize()) { authorizeSensitiveOperation(GET_ATTRIBUTE, readOnly, true); } return delegate.getAttribute(name, attribute); } catch (Exception e) { error = e; if (e instanceof MBeanException) throw (MBeanException)e; if (e instanceof AttributeNotFoundException) throw (AttributeNotFoundException)e; if (e instanceof InstanceNotFoundException) throw (InstanceNotFoundException)e; if (e instanceof ReflectionException) throw (ReflectionException)e; throw makeRuntimeException(e); } finally { if (shouldAuditLog(delegate, readOnly)) { new MBeanServerAuditLogRecordFormatter(this, error, readOnly).getAttribute(name, attribute); } } }