Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
When DefaultListDelimiterHandler.escapeList is invoked with list of anything except String, it is throwing exception:
java.lang.ArrayStoreException: java.lang.Integer at org.apache.commons.configuration2.convert.DefaultListDelimiterHandler.escapeList(DefaultListDelimiterHandler.java:110)
Reason: escapedValues is created as String array, but assigned to Object array
final Object[] escapedValues = new String[values.size()];
later Object returned from escape is attempted to store into (String) array:
escapedValues[idx++] = escape(v, transformer);
Suggested solution is to create escapedValues as Object array:
final Object[] escapedValues = new Object[values.size()];