--- a/jdk/src/share/classes/javax/management/ObjectName.java Thu Jul 31 15:31:13 2008 +0200
+++ b/jdk/src/share/classes/javax/management/ObjectName.java Thu Jul 31 17:38:55 2008 +0200
@@ -38,9 +38,6 @@
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.QueryExp;
/**
* <p>Represents the object name of an MBean, or a pattern that can
@@ -1160,9 +1157,19 @@
//
//in.defaultReadObject();
final ObjectInputStream.GetField fields = in.readFields();
+ String propListString =
+ (String)fields.get("propertyListString", "");
+
+ // 6616825: take care of property patterns
+ final boolean propPattern =
+ fields.get("propertyPattern" , false);
+ if (propPattern) {
+ propListString =
+ (propListString.length()==0?"*":(propListString+",*"));
+ }
+
cn = (String)fields.get("domain", "default")+
- ":"+
- (String)fields.get("propertyListString", "");
+ ":"+ propListString;
} else {
// Read an object serialized in the new serial form
//
@@ -1796,6 +1803,7 @@
* @return True if <code>object</code> is an ObjectName whose
* canonical form is equal to that of this ObjectName.
*/
+ @Override
public boolean equals(Object object) {
// same object case
@@ -1819,6 +1827,7 @@
* Returns a hash code for this object name.
*
*/
+ @Override
public int hashCode() {
return _canonicalName.hashCode();
}