--- a/jdk/src/share/classes/javax/management/ObjectName.java Fri Feb 29 20:04:01 2008 -0800
+++ b/jdk/src/share/classes/javax/management/ObjectName.java Mon Mar 03 10:32:38 2008 +0100
@@ -222,7 +222,8 @@
* @since 1.5
*/
@SuppressWarnings("serial") // don't complain serialVersionUID not constant
-public class ObjectName implements Comparable<ObjectName>, QueryExp {
+public class ObjectName extends ToQueryString
+ implements Comparable<ObjectName>, QueryExp {
/**
* A structure recording property structure and
@@ -1779,10 +1780,16 @@
*
* @return a string representation of this object name.
*/
+ @Override
public String toString() {
return getSerializedNameString();
}
+ @Override
+ String toQueryString() {
+ return "LIKE " + Query.value(toString());
+ }
+
/**
* Compares the current object name with another object name. Two
* ObjectName instances are equal if and only if their canonical