summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/management/openmbean/CompositeDataSupport.java')
-rw-r--r--libjava/classpath/javax/management/openmbean/CompositeDataSupport.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java b/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
index d4c9d450c38..6bce2672d4f 100644
--- a/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
+++ b/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
@@ -154,7 +154,7 @@ public class CompositeDataSupport
throw new IllegalArgumentException("The values array is null.");
if (names.length != values.length)
throw new IllegalArgumentException("The sizes of the arrays differ.");
- Set typeKeys = type.keySet();
+ Set<String> typeKeys = type.keySet();
if (typeKeys.size() != names.length)
throw new OpenDataException("The number of field names does not match " +
"the type description.");
@@ -227,10 +227,8 @@ public class CompositeDataSupport
CompositeData data = (CompositeData) obj;
if (!(data.getCompositeType().equals(compositeType)))
return false;
- Iterator it = contents.keySet().iterator();
- while (it.hasNext())
+ for (String key : contents.keySet())
{
- String key = (String) it.next();
if (!(data.containsKey(key)))
return false;
if (!(data.get(key).equals(contents.get(key))))
@@ -308,9 +306,8 @@ public class CompositeDataSupport
public int hashCode()
{
int code = compositeType.hashCode();
- Iterator it = values().iterator();
- while (it.hasNext())
- code += it.next().hashCode();
+ for (Object o : contents.values())
+ code += o.hashCode();
return code;
}
OpenPOWER on IntegriCloud