提交 bcaacfd4 编写于 作者: E emcmanus

6405862: Allow CompositeType to have zero items

6737133: Compilation failure of test/javax/management/eventService/LeaseManagerDeadlockTest.java
6737140: Javadoc of some throw clauses of MBeanServer and MBeanServerConnection is garbled
6737143: createMBean of MBeanServer should acquire 2 extra throw clauses present in MBeanServerConnection
Reviewed-by: dfuchs
上级 a41e60db
...@@ -264,6 +264,8 @@ public interface MBeanServer extends MBeanServerConnection { ...@@ -264,6 +264,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p> * is sent as described <a href="#notif">above</a>.</p>
* *
* @throws RuntimeOperationsException {@inheritDoc} * @throws RuntimeOperationsException {@inheritDoc}
* @throws RuntimeMBeanException {@inheritDoc}
* @throws RuntimeErrorException {@inheritDoc}
*/ */
public ObjectInstance createMBean(String className, ObjectName name) public ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException, throws ReflectionException, InstanceAlreadyExistsException,
...@@ -276,6 +278,8 @@ public interface MBeanServer extends MBeanServerConnection { ...@@ -276,6 +278,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p> * is sent as described <a href="#notif">above</a>.</p>
* *
* @throws RuntimeOperationsException {@inheritDoc} * @throws RuntimeOperationsException {@inheritDoc}
* @throws RuntimeMBeanException {@inheritDoc}
* @throws RuntimeErrorException {@inheritDoc}
*/ */
public ObjectInstance createMBean(String className, ObjectName name, public ObjectInstance createMBean(String className, ObjectName name,
ObjectName loaderName) ObjectName loaderName)
...@@ -289,6 +293,8 @@ public interface MBeanServer extends MBeanServerConnection { ...@@ -289,6 +293,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p> * is sent as described <a href="#notif">above</a>.</p>
* *
* @throws RuntimeOperationsException {@inheritDoc} * @throws RuntimeOperationsException {@inheritDoc}
* @throws RuntimeMBeanException {@inheritDoc}
* @throws RuntimeErrorException {@inheritDoc}
*/ */
public ObjectInstance createMBean(String className, ObjectName name, public ObjectInstance createMBean(String className, ObjectName name,
Object params[], String signature[]) Object params[], String signature[])
...@@ -302,6 +308,8 @@ public interface MBeanServer extends MBeanServerConnection { ...@@ -302,6 +308,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p> * is sent as described <a href="#notif">above</a>.</p>
* *
* @throws RuntimeOperationsException {@inheritDoc} * @throws RuntimeOperationsException {@inheritDoc}
* @throws RuntimeMBeanException {@inheritDoc}
* @throws RuntimeErrorException {@inheritDoc}
*/ */
public ObjectInstance createMBean(String className, ObjectName name, public ObjectInstance createMBean(String className, ObjectName name,
ObjectName loaderName, Object params[], ObjectName loaderName, Object params[],
......
...@@ -78,19 +78,19 @@ public interface MBeanServerConnection extends NotificationManager { ...@@ -78,19 +78,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered. * MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE> * @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a
* <CODE>RuntimeException</CODE>, the <CODE>createMBean<CODE> method will * <CODE>RuntimeException</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation * throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can * threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE> * @exception RuntimeErrorException If the <CODE>postRegister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an
* <CODE>Error</CODE>, the <CODE>createMBean<CODE> method will * <CODE>Error</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation * throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeErrorException</CODE> can * threw an exception. Note that <CODE>RuntimeErrorException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
...@@ -150,19 +150,19 @@ public interface MBeanServerConnection extends NotificationManager { ...@@ -150,19 +150,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered. * MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE> * @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a
* <CODE>RuntimeException</CODE>, the <CODE>createMBean<CODE> method will * <CODE>RuntimeException</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation * throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can * threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE> * @exception RuntimeErrorException If the <CODE>postRegister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an
* <CODE>Error</CODE>, the <CODE>createMBean<CODE> method will * <CODE>Error</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation * throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeErrorException</CODE> can * threw an exception. Note that <CODE>RuntimeErrorException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
...@@ -225,19 +225,19 @@ public interface MBeanServerConnection extends NotificationManager { ...@@ -225,19 +225,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered. * MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE> * @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a
* <CODE>RuntimeException</CODE>, the <CODE>createMBean<CODE> method will * <CODE>RuntimeException</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation * throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can * threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE> * @exception RuntimeErrorException If the <CODE>postRegister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an
* <CODE>Error</CODE>, the <CODE>createMBean<CODE> method will * <CODE>Error</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation * throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeErrorException</CODE> can * threw an exception. Note that <CODE>RuntimeErrorException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
...@@ -297,19 +297,19 @@ public interface MBeanServerConnection extends NotificationManager { ...@@ -297,19 +297,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered. * MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE> * @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a
* <CODE>RuntimeException</CODE>, the <CODE>createMBean<CODE> method will * <CODE>RuntimeException</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation * throw a <CODE>RuntimeMBeanException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can * threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE> method * @exception RuntimeErrorException If the <CODE>postRegister</CODE> method
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an
* <CODE>Error</CODE>, the <CODE>createMBean<CODE> method will * <CODE>Error</CODE>, the <CODE>createMBean</CODE> method will
* throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation * throw a <CODE>RuntimeErrorException</CODE>, although the MBean creation
* and registration succeeded. In such a case, the MBean will be actually * and registration succeeded. In such a case, the MBean will be actually
* registered even though the <CODE>createMBean<CODE> method * registered even though the <CODE>createMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeErrorException</CODE> can * threw an exception. Note that <CODE>RuntimeErrorException</CODE> can
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered. * will not be registered.
...@@ -351,19 +351,19 @@ public interface MBeanServerConnection extends NotificationManager { ...@@ -351,19 +351,19 @@ public interface MBeanServerConnection extends NotificationManager {
* has thrown an exception. * has thrown an exception.
* @exception RuntimeMBeanException If the <CODE>postDeregister</CODE> * @exception RuntimeMBeanException If the <CODE>postDeregister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a
* <CODE>RuntimeException</CODE>, the <CODE>unregisterMBean<CODE> method * <CODE>RuntimeException</CODE>, the <CODE>unregisterMBean</CODE> method
* will throw a <CODE>RuntimeMBeanException</CODE>, although the MBean * will throw a <CODE>RuntimeMBeanException</CODE>, although the MBean
* unregistration succeeded. In such a case, the MBean will be actually * unregistration succeeded. In such a case, the MBean will be actually
* unregistered even though the <CODE>unregisterMBean<CODE> method * unregistered even though the <CODE>unregisterMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can * threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can
* also be thrown by <CODE>preDeregister</CODE>, in which case the MBean * also be thrown by <CODE>preDeregister</CODE>, in which case the MBean
* will remain registered. * will remain registered.
* @exception RuntimeErrorException If the <CODE>postDeregister</CODE> * @exception RuntimeErrorException If the <CODE>postDeregister</CODE>
* (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an
* <CODE>Error</CODE>, the <CODE>unregisterMBean<CODE> method will * <CODE>Error</CODE>, the <CODE>unregisterMBean</CODE> method will
* throw a <CODE>RuntimeErrorException</CODE>, although the MBean * throw a <CODE>RuntimeErrorException</CODE>, although the MBean
* unregistration succeeded. In such a case, the MBean will be actually * unregistration succeeded. In such a case, the MBean will be actually
* unregistered even though the <CODE>unregisterMBean<CODE> method * unregistered even though the <CODE>unregisterMBean</CODE> method
* threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can * threw an exception. Note that <CODE>RuntimeMBeanException</CODE> can
* also be thrown by <CODE>preDeregister</CODE>, in which case the MBean * also be thrown by <CODE>preDeregister</CODE>, in which case the MBean
* will remain registered. * will remain registered.
......
...@@ -89,7 +89,7 @@ public class CompositeType extends OpenType<CompositeData> { ...@@ -89,7 +89,7 @@ public class CompositeType extends OpenType<CompositeData> {
* <br>&nbsp; * <br>&nbsp;
* @param itemNames The names of the items contained in the * @param itemNames The names of the items contained in the
* composite data values described by this <code>CompositeType</code> instance; * composite data values described by this <code>CompositeType</code> instance;
* cannot be null and should contain at least one element; no element can be a null or empty string. * cannot be null; no element can be null or an empty string.
* Note that the order in which the item names are given is not important to differentiate a * Note that the order in which the item names are given is not important to differentiate a
* <code>CompositeType</code> instance from another; * <code>CompositeType</code> instance from another;
* the item names are internally stored sorted in ascending alphanumeric order. * the item names are internally stored sorted in ascending alphanumeric order.
...@@ -97,7 +97,7 @@ public class CompositeType extends OpenType<CompositeData> { ...@@ -97,7 +97,7 @@ public class CompositeType extends OpenType<CompositeData> {
* @param itemDescriptions The descriptions, in the same order as <var>itemNames</var>, of the items contained in the * @param itemDescriptions The descriptions, in the same order as <var>itemNames</var>, of the items contained in the
* composite data values described by this <code>CompositeType</code> instance; * composite data values described by this <code>CompositeType</code> instance;
* should be of the same size as <var>itemNames</var>; * should be of the same size as <var>itemNames</var>;
* no element can be a null or empty string. * no element can be null or an empty string.
* <br>&nbsp; * <br>&nbsp;
* @param itemTypes The open type instances, in the same order as <var>itemNames</var>, describing the items contained * @param itemTypes The open type instances, in the same order as <var>itemNames</var>, describing the items contained
* in the composite data values described by this <code>CompositeType</code> instance; * in the composite data values described by this <code>CompositeType</code> instance;
...@@ -125,7 +125,7 @@ public class CompositeType extends OpenType<CompositeData> { ...@@ -125,7 +125,7 @@ public class CompositeType extends OpenType<CompositeData> {
// //
super(CompositeData.class.getName(), typeName, description, false); super(CompositeData.class.getName(), typeName, description, false);
// Check the 3 arrays are not null or empty (ie length==0) and that there is no null element or empty string in them // Check the 3 arrays are not null and that there is no null element or empty string in them
// //
checkForNullElement(itemNames, "itemNames"); checkForNullElement(itemNames, "itemNames");
checkForNullElement(itemDescriptions, "itemDescriptions"); checkForNullElement(itemDescriptions, "itemDescriptions");
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* @bug 6717789 * @bug 6717789
* @summary Check that a lock is not held when a LeaseManager expires. * @summary Check that a lock is not held when a LeaseManager expires.
* @author Eamonn McManus * @author Eamonn McManus
* @compile -XDignore.symbol.file=true LeaseManagerDeadlockTest.java
*/ */
import com.sun.jmx.event.LeaseManager; import com.sun.jmx.event.LeaseManager;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册