summaryrefslogtreecommitdiff
path: root/javax
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2007-02-19 13:58:27 +0000
committerGary Benson <gbenson@redhat.com>2007-02-19 13:58:27 +0000
commitf483dbf28ff73cf31e813c6461db6e420d22c285 (patch)
treeda7ece49a0099b1889737393c151af908fb4de1f /javax
parent6c03711f6c090884e4ab4a3917cce139af636c7f (diff)
downloadclasspath-f483dbf28ff73cf31e813c6461db6e420d22c285.tar.gz
2007-02-19 Gary Benson <gbenson@redhat.com>
* javax/management/ObjectName.java (properties): Initialize when declared. (ObjectName(String)): Don't initialize properties here. (ObjectName(String, String, String): Likewise.
Diffstat (limited to 'javax')
-rw-r--r--javax/management/ObjectName.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/javax/management/ObjectName.java b/javax/management/ObjectName.java
index 3a0d87769..41bbfb677 100644
--- a/javax/management/ObjectName.java
+++ b/javax/management/ObjectName.java
@@ -105,7 +105,7 @@ public class ObjectName
/**
* The properties, as key-value pairs.
*/
- private TreeMap<String,String> properties;
+ private TreeMap<String,String> properties = new TreeMap<String,String>();
/**
* The properties as a string (stored for ordering).
@@ -164,7 +164,6 @@ public class ObjectName
throw new MalformedObjectNameException("A name that is not a " +
"pattern must contain at " +
"least one key-value pair.");
- properties = new TreeMap<String,String>();
for (int a = 0; a < pairs.length; ++a)
{
int sep = pairs[a].indexOf('=');
@@ -197,7 +196,6 @@ public class ObjectName
throws MalformedObjectNameException
{
this.domain = domain;
- properties = new TreeMap<String,String>();
properties.put(key, value);
checkComponents();
}