Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.1
-
None
-
None
-
None
-
Operating System: other
Platform: Other
-
35945
Description
The MapConfiguration addPropertyDirect method does not support multiple-valued properties. The following implementation is what I used to fix the problem.
protected void addPropertyDirect(String key, Object obj) {
Object currentValue = getProperty(key);
if (currentValue == null)
else if (List.class.isAssignableFrom(currentValue.getClass()))
{ ((List) currentValue).add(obj); }else
{ List values = new ArrayList(); values.add(currentValue); values.add(obj); getMap().put(key, values); }}