}
@Override
protected void populateMap(final HierarchicalStreamReader reader, final UnmarshallingContext context,
final Map<?, ?> map, final Map<?, ?> target) {
SingleValueConverter keyConverter = null;
SingleValueConverter valueConverter = null;
if (keyAsAttribute) {
keyConverter = getSingleValueConverter(keyType);
}
if (valueAsAttribute || valueName == null) {
valueConverter = getSingleValueConverter(valueType);
}
while (reader.hasMoreChildren()) {
Object key = null;
Object value = null;
if (entryName != null) {
reader.moveDown();
if (keyConverter != null) {
final String attribute = reader.getAttribute(keyName);
if (attribute != null) {
key = keyConverter.fromString(attribute);
}
}
if (valueAsAttribute && valueConverter != null) {
final String attribute = reader.getAttribute(valueName);
if (attribute != null) {
value = valueConverter.fromString(attribute);
}
}
}
if (keyConverter == null) {