--- a/jdk/src/share/classes/javax/management/ObjectName.java Thu Mar 27 14:15:59 2008 -0700
+++ b/jdk/src/share/classes/javax/management/ObjectName.java Tue Apr 01 14:45:23 2008 +0200
@@ -26,6 +26,7 @@
package javax.management;
import com.sun.jmx.mbeanserver.GetPropertyAction;
+import com.sun.jmx.mbeanserver.Util;
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
@@ -1386,12 +1387,7 @@
throws NullPointerException {
if (name.getClass().equals(ObjectName.class))
return name;
- try {
- return new ObjectName(name.getSerializedNameString());
- } catch (MalformedObjectNameException e) {
- throw new IllegalArgumentException("Unexpected: " + e);
- // can't happen
- }
+ return Util.newObjectName(name.getSerializedNameString());
}
/**
@@ -1950,14 +1946,7 @@
*
* @since 1.6
*/
- public static final ObjectName WILDCARD;
- static {
- try {
- WILDCARD = new ObjectName("*:*");
- } catch (MalformedObjectNameException e) {
- throw new Error("Can't initialize wildcard name", e);
- }
- }
+ public static final ObjectName WILDCARD = Util.newObjectName("*:*");
// Category : Utilities <===================================