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.java49
1 files changed, 24 insertions, 25 deletions
diff --git a/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java b/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
index 6bce2672d4f..2cc6f4049db 100644
--- a/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
+++ b/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
@@ -109,9 +109,9 @@ public class CompositeDataSupport
public CompositeDataSupport(CompositeType type, Map<String, ?> items)
throws OpenDataException
{
- this(type,
- items.keySet().toArray(new String[items.size()]),
- items.values().toArray());
+ this(type,
+ items.keySet().toArray(new String[items.size()]),
+ items.values().toArray());
}
/**
@@ -157,26 +157,26 @@ public class CompositeDataSupport
Set<String> typeKeys = type.keySet();
if (typeKeys.size() != names.length)
throw new OpenDataException("The number of field names does not match " +
- "the type description.");
+ "the type description.");
contents = new TreeMap<String, Object>();
for (int a = 0; a < names.length; ++a)
{
- if (names[a] == null)
- throw new IllegalArgumentException("Element " + a + " of the names " +
- "array is null.");
- if (names[a].length() == 0)
- throw new IllegalArgumentException("Element " + a + " of the names " +
- "array is an empty string.");
- if (values[a] == null)
- throw new IllegalArgumentException("Element " + a + " of the values " +
- "array is null.");
- if (!(typeKeys.contains(names[a])))
- throw new OpenDataException("The name, " + names[a] + ", is not a " +
- "field in the given type description.");
- if (!(type.getType(names[a]).isValue(values[a])))
- throw new OpenDataException("The value, " + values[a] + ", is not a " +
- "valid value for the " + names[a] + " field.");
- contents.put(names[a], values[a]);
+ if (names[a] == null)
+ throw new IllegalArgumentException("Element " + a + " of the names " +
+ "array is null.");
+ if (names[a].length() == 0)
+ throw new IllegalArgumentException("Element " + a + " of the names " +
+ "array is an empty string.");
+ if (values[a] == null)
+ throw new IllegalArgumentException("Element " + a + " of the values " +
+ "array is null.");
+ if (!(typeKeys.contains(names[a])))
+ throw new OpenDataException("The name, " + names[a] + ", is not a " +
+ "field in the given type description.");
+ if (!(type.getType(names[a]).isValue(values[a])))
+ throw new OpenDataException("The value, " + values[a] + ", is not a " +
+ "valid value for the " + names[a] + " field.");
+ contents.put(names[a], values[a]);
}
}
@@ -229,10 +229,10 @@ public class CompositeDataSupport
return false;
for (String key : contents.keySet())
{
- if (!(data.containsKey(key)))
- return false;
- if (!(data.get(key).equals(contents.get(key))))
- return false;
+ if (!(data.containsKey(key)))
+ return false;
+ if (!(data.get(key).equals(contents.get(key))))
+ return false;
}
return true;
}
@@ -343,4 +343,3 @@ public class CompositeDataSupport
}
}
-
OpenPOWER on IntegriCloud