aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremcmanus <none@none>2008-09-02 14:14:05 +0200
committeremcmanus <none@none>2008-09-02 14:14:05 +0200
commit5ac6deb2c132d378c54dc5a55dd8afd53080674b (patch)
treea155bc93f3173c9a3360019c82d3dc13f83b6230
parenteb87a0c4f9ddf831185074c384bfe180c7939eeb (diff)
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
-rw-r--r--src/share/classes/javax/management/MBeanServer.java8
-rw-r--r--src/share/classes/javax/management/MBeanServerConnection.java40
-rw-r--r--src/share/classes/javax/management/openmbean/CompositeType.java6
-rw-r--r--test/javax/management/eventService/LeaseManagerDeadlockTest.java1
4 files changed, 32 insertions, 23 deletions
diff --git a/src/share/classes/javax/management/MBeanServer.java b/src/share/classes/javax/management/MBeanServer.java
index a08f64011..613cf09cf 100644
--- a/src/share/classes/javax/management/MBeanServer.java
+++ b/src/share/classes/javax/management/MBeanServer.java
@@ -264,6 +264,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p>
*
* @throws RuntimeOperationsException {@inheritDoc}
+ * @throws RuntimeMBeanException {@inheritDoc}
+ * @throws RuntimeErrorException {@inheritDoc}
*/
public ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException,
@@ -276,6 +278,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p>
*
* @throws RuntimeOperationsException {@inheritDoc}
+ * @throws RuntimeMBeanException {@inheritDoc}
+ * @throws RuntimeErrorException {@inheritDoc}
*/
public ObjectInstance createMBean(String className, ObjectName name,
ObjectName loaderName)
@@ -289,6 +293,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p>
*
* @throws RuntimeOperationsException {@inheritDoc}
+ * @throws RuntimeMBeanException {@inheritDoc}
+ * @throws RuntimeErrorException {@inheritDoc}
*/
public ObjectInstance createMBean(String className, ObjectName name,
Object params[], String signature[])
@@ -302,6 +308,8 @@ public interface MBeanServer extends MBeanServerConnection {
* is sent as described <a href="#notif">above</a>.</p>
*
* @throws RuntimeOperationsException {@inheritDoc}
+ * @throws RuntimeMBeanException {@inheritDoc}
+ * @throws RuntimeErrorException {@inheritDoc}
*/
public ObjectInstance createMBean(String className, ObjectName name,
ObjectName loaderName, Object params[],
diff --git a/src/share/classes/javax/management/MBeanServerConnection.java b/src/share/classes/javax/management/MBeanServerConnection.java
index 779301491..8b0dd6646 100644
--- a/src/share/classes/javax/management/MBeanServerConnection.java
+++ b/src/share/classes/javax/management/MBeanServerConnection.java
@@ -78,19 +78,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE>
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
@@ -150,19 +150,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE>
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
@@ -225,19 +225,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE>
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
@@ -297,19 +297,19 @@ public interface MBeanServerConnection extends NotificationManager {
* MBean will not be registered.
* @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
* @exception RuntimeErrorException If the <CODE>postRegister</CODE> method
* (<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
* 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
* also be thrown by <CODE>preRegister</CODE>, in which case the MBean
* will not be registered.
@@ -351,19 +351,19 @@ public interface MBeanServerConnection extends NotificationManager {
* has thrown an exception.
* @exception RuntimeMBeanException If the <CODE>postDeregister</CODE>
* (<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
* 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
* also be thrown by <CODE>preDeregister</CODE>, in which case the MBean
* will remain registered.
* @exception RuntimeErrorException If the <CODE>postDeregister</CODE>
* (<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
* 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
* also be thrown by <CODE>preDeregister</CODE>, in which case the MBean
* will remain registered.
diff --git a/src/share/classes/javax/management/openmbean/CompositeType.java b/src/share/classes/javax/management/openmbean/CompositeType.java
index b513b0faa..b4c662ec9 100644
--- a/src/share/classes/javax/management/openmbean/CompositeType.java
+++ b/src/share/classes/javax/management/openmbean/CompositeType.java
@@ -89,7 +89,7 @@ public class CompositeType extends OpenType<CompositeData> {
* <br>&nbsp;
* @param itemNames The names of the items contained in the
* 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
* <code>CompositeType</code> instance from another;
* the item names are internally stored sorted in ascending alphanumeric order.
@@ -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
* composite data values described by this <code>CompositeType</code> instance;
* 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;
* @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;
@@ -125,7 +125,7 @@ public class CompositeType extends OpenType<CompositeData> {
//
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(itemDescriptions, "itemDescriptions");
diff --git a/test/javax/management/eventService/LeaseManagerDeadlockTest.java b/test/javax/management/eventService/LeaseManagerDeadlockTest.java
index 586b24402..453aafe4b 100644
--- a/test/javax/management/eventService/LeaseManagerDeadlockTest.java
+++ b/test/javax/management/eventService/LeaseManagerDeadlockTest.java
@@ -26,6 +26,7 @@
* @bug 6717789
* @summary Check that a lock is not held when a LeaseManager expires.
* @author Eamonn McManus
+ * @compile -XDignore.symbol.file=true LeaseManagerDeadlockTest.java
*/
import com.sun.jmx.event.LeaseManager;