import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.SortedMap;
import java.util.TreeMap;
import java.util.Vector;
{
/*
* expand values in a Map attribute across separate lines
+ * copy to a TreeMap for alphabetical ordering
*/
- Map<?, ?> values = (Map<?, ?>) value;
- for (Entry<?, ?> e : values.entrySet())
+ Map<String, Object> values = (Map<String, Object>) value;
+ SortedMap<String, Object> sm = new TreeMap<>(
+ String.CASE_INSENSITIVE_ORDER);
+ sm.putAll(values);
+ for (Entry<?, ?> e : sm.entrySet())
{
sb.append(String.format(ROW_DATA, key, e.getKey().toString(), e
.getValue().toString()));