6659240: Exceptions thrown by MXBeans wrongly documented in j.l.m.ManagementFactory

Reviewed-by: dfuchs, jbachorik
This commit is contained in:
Sharath Ballal 2016-02-02 10:44:55 +01:00 committed by Jaroslav Bachorik
parent e5bf0846fa
commit ae90afc360

View File

@ -519,9 +519,13 @@ public class ManagementFactory {
* {@code MBeanServerConnection} where * {@code MBeanServerConnection} where
* {@link java.io.IOException IOException} may be thrown * {@link java.io.IOException IOException} may be thrown
* when the communication problem occurs with the connector server. * when the communication problem occurs with the connector server.
* An application remotely accesses the platform MXBeans using * If thrown, {@link java.io.IOException IOException} will be wrappped in
* proxy should prepare to catch {@code IOException} as if * {@link java.lang.reflect.UndeclaredThrowableException UndeclaredThrowableException}.
* accessing with the {@code MBeanServerConnector} interface.</li> * An application remotely accessing the platform MXBeans using
* proxy should prepare to catch {@code UndeclaredThrowableException} and
* handle its {@linkplain java.lang.reflect.UndeclaredThrowableException#getCause() cause}
* as if that cause had been thrown by the {@code MBeanServerConnection}
* interface.</li>
* *
* <li>When a client application is designed to remotely access MXBeans * <li>When a client application is designed to remotely access MXBeans
* for a running virtual machine whose version is different than * for a running virtual machine whose version is different than
@ -530,7 +534,11 @@ public class ManagementFactory {
* {@link java.io.InvalidObjectException InvalidObjectException} * {@link java.io.InvalidObjectException InvalidObjectException}
* which is thrown when an MXBean proxy receives a name of an * which is thrown when an MXBean proxy receives a name of an
* enum constant which is missing in the enum class loaded in * enum constant which is missing in the enum class loaded in
* the client application. </li> * the client application. If thrown,
* {@link java.io.InvalidObjectException InvalidObjectException} will be
* wrappped in
* {@link java.lang.reflect.UndeclaredThrowableException UndeclaredThrowableException}.
* </li>
* *
* <li>{@link javax.management.MBeanServerInvocationHandler * <li>{@link javax.management.MBeanServerInvocationHandler
* MBeanServerInvocationHandler} or its * MBeanServerInvocationHandler} or its