[jira] [Commented] (CONFIGURATION-808) DefaultListDelimiterHandler.escapeList working only for List
[ https://issues.apache.org/jira/browse/CONFIGURATION-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17368625#comment-17368625 ] Cedomir Igaly commented on CONFIGURATION-808: - Unfortunately, build will never successfully end since master branch can not be built under JDK 16+ > DefaultListDelimiterHandler.escapeList working only for List > > > Key: CONFIGURATION-808 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-808 > Project: Commons Configuration > Issue Type: Bug >Reporter: Cedomir Igaly >Priority: Minor > > 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:#00}escapedValues{color} is created as String array, but > assigned to Object array > > {color:#0033b3}final {color}{color:#00}Object{color}[] > {color:#00}escapedValues {color}= {color:#0033b3}new > {color}String[values.size()]; > > later Object returned from escape is attempted to store into (String) array: > {color:#00}escapedValues{color}[idx++] = escape({color:#00}v{color}, > transformer); > > Suggested solution is to create escapedValues as Object array: > {color:#0033b3}final {color}{color:#00}Object{color}[] > {color:#00}escapedValues {color}= {color:#0033b3}new > {color}Object[values.size()]; -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (CONFIGURATION-808) DefaultListDelimiterHandler.escapeList working only for List
[ https://issues.apache.org/jira/browse/CONFIGURATION-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17366244#comment-17366244 ] Gary D. Gregory commented on CONFIGURATION-808: --- Waiting on PR GitHub build in progresss... > DefaultListDelimiterHandler.escapeList working only for List > > > Key: CONFIGURATION-808 > URL: https://issues.apache.org/jira/browse/CONFIGURATION-808 > Project: Commons Configuration > Issue Type: Bug >Reporter: Cedomir Igaly >Priority: Minor > > 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:#00}escapedValues{color} is created as String array, but > assigned to Object array > > {color:#0033b3}final {color}{color:#00}Object{color}[] > {color:#00}escapedValues {color}= {color:#0033b3}new > {color}String[values.size()]; > > later Object returned from escape is attempted to store into (String) array: > {color:#00}escapedValues{color}[idx++] = escape({color:#00}v{color}, > transformer); > > Suggested solution is to create escapedValues as Object array: > {color:#0033b3}final {color}{color:#00}Object{color}[] > {color:#00}escapedValues {color}= {color:#0033b3}new > {color}Object[values.size()]; -- This message was sent by Atlassian Jira (v8.3.4#803005)