[ 
https://issues.apache.org/jira/browse/CONFIGURATION-808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matt Juntunen closed CONFIGURATION-808.
---------------------------------------

v2.8.0 released

> DefaultListDelimiterHandler.escapeList working only for List<String>
> --------------------------------------------------------------------
>
>                 Key: CONFIGURATION-808
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-808
>             Project: Commons Configuration
>          Issue Type: Bug
>            Reporter: Cedomir Igaly
>            Priority: Minor
>             Fix For: 2.8.0
>
>
> 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: {color:#000000}escapedValues{color} is created as String array, but 
> assigned to Object array
>  
> {color:#0033b3}final {color}{color:#000000}Object{color}[] 
> {color:#000000}escapedValues {color}= {color:#0033b3}new 
> {color}String[values.size()];
>  
> later Object returned from escape is attempted to store into (String) array:
> {color:#000000}escapedValues{color}[idx++] = escape({color:#000000}v{color}, 
> transformer);
>  
> Suggested solution is to create escapedValues as Object array:
> {color:#0033b3}final {color}{color:#000000}Object{color}[] 
> {color:#000000}escapedValues {color}= {color:#0033b3}new 
> {color}Object[values.size()];



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to