try {
level = Integer.parseInt(getLevel());
} catch (NumberFormatException ex) {
level = DEFAUL_LEVEL;
}
<BUG>map.put(FIELD_LEVEL, level);
} else {
map.put(FIELD_LEVEL, getLevel());
}</BUG>
}

try {
level = Integer.parseInt(getLevel());
} catch (NumberFormatException ex) {
level = DEFAUL_LEVEL;
}
hasFields = writeIfNotEmpty(out, hasFields, FIELD_LEVEL, level);
} else {
hasFields = writeIfNotEmpty(out, hasFields, FIELD_LEVEL, getLevel());
}
}
