[jira] [Work logged] (CAMEL-13741) Map to Iterable converter regression
[ https://issues.apache.org/jira/browse/CAMEL-13741?focusedWorklogId=275911&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-275911 ] ASF GitHub Bot logged work on CAMEL-13741: -- Author: ASF GitHub Bot Created on: 12/Jul/19 13:22 Start Date: 12/Jul/19 13:22 Worklog Time Spent: 10m Work Description: oscerd commented on pull request #3035: CAMEL-13741 - Allow to convert a Map to an Iterable URL: https://github.com/apache/camel/pull/3035 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 275911) Time Spent: 0.5h (was: 20m) > Map to Iterable converter regression > > > Key: CAMEL-13741 > URL: https://issues.apache.org/jira/browse/CAMEL-13741 > Project: Camel > Issue Type: Improvement > Components: camel-core >Affects Versions: 2.20.0 >Reporter: Antoine DESSAIGNE >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > When converting a {{Map}} to an {{Iterable}} the results is no longer the > same since CAMEL-11379. > Given the following context > {code} > > http://camel.apache.org/schema/spring";> > > > > [A: 'aa', B: 'bb', C: 'cc', D: 'dd'] > > > > ${body} > > > > > {code} > It produces 4 log messages in camel 2.18.3 using the converter > {{CollectionConverter.toSet(java.util.Map)}}. Using camel 2.24.1 it > produces only one message containing the whole list. This is due to > {{ObjectConverterOptimised}} calling > {{ObjectHelper.createIterable(java.lang.Object)}} which has a fallback to > {{Collections.singletonList(value)}} thus producing a single entry with the > whole Map. > The fix is probably to add in > {{ObjectHelper.createIterable(java.lang.Object)}} the following code > {code} > if (value instanceof Map) { > return ((Map)value).entrySet(); > } > {code} > but I would like to know what you think about it before doing a pull request. > Thanks -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (CAMEL-13741) Map to Iterable converter regression
[ https://issues.apache.org/jira/browse/CAMEL-13741?focusedWorklogId=275401&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-275401 ] ASF GitHub Bot logged work on CAMEL-13741: -- Author: ASF GitHub Bot Created on: 11/Jul/19 16:41 Start Date: 11/Jul/19 16:41 Worklog Time Spent: 10m Work Description: adessaigne commented on pull request #3035: CAMEL-13741 - Allow to convert a Map to an Iterable URL: https://github.com/apache/camel/pull/3035 The conversion from `Map` to `Iterable` used to be handled by the converter `CollectionConverter.toSet(Map)` Now that `ObjectConverterOptimised` is used before searching for a converter the `Map` to `Iterable` converter need to be handled at `ObjectHelper.createIterable()` level. Same as #3031 but for camel-2.x branch This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 275401) Time Spent: 20m (was: 10m) > Map to Iterable converter regression > > > Key: CAMEL-13741 > URL: https://issues.apache.org/jira/browse/CAMEL-13741 > Project: Camel > Issue Type: Improvement > Components: camel-core >Affects Versions: 2.20.0 >Reporter: Antoine DESSAIGNE >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > When converting a {{Map}} to an {{Iterable}} the results is no longer the > same since CAMEL-11379. > Given the following context > {code} > > http://camel.apache.org/schema/spring";> > > > > [A: 'aa', B: 'bb', C: 'cc', D: 'dd'] > > > > ${body} > > > > > {code} > It produces 4 log messages in camel 2.18.3 using the converter > {{CollectionConverter.toSet(java.util.Map)}}. Using camel 2.24.1 it > produces only one message containing the whole list. This is due to > {{ObjectConverterOptimised}} calling > {{ObjectHelper.createIterable(java.lang.Object)}} which has a fallback to > {{Collections.singletonList(value)}} thus producing a single entry with the > whole Map. > The fix is probably to add in > {{ObjectHelper.createIterable(java.lang.Object)}} the following code > {code} > if (value instanceof Map) { > return ((Map)value).entrySet(); > } > {code} > but I would like to know what you think about it before doing a pull request. > Thanks -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Work logged] (CAMEL-13741) Map to Iterable converter regression
[ https://issues.apache.org/jira/browse/CAMEL-13741?focusedWorklogId=275010&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-275010 ] ASF GitHub Bot logged work on CAMEL-13741: -- Author: ASF GitHub Bot Created on: 10/Jul/19 19:27 Start Date: 10/Jul/19 19:27 Worklog Time Spent: 10m Work Description: adessaigne commented on pull request #3031: CAMEL-13741 - Allow to convert a Map to an Iterable URL: https://github.com/apache/camel/pull/3031 The conversion from `Map` to `Iterable` used to be handled by the converter `CollectionConverter.toSet(Map)` Now that `ObjectConverterOptimised` is used before searching for a converter the `Map` to `Iterable` converter need to be handled at `ObjectHelper.createIterable()` level. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 275010) Time Spent: 10m Remaining Estimate: 0h > Map to Iterable converter regression > > > Key: CAMEL-13741 > URL: https://issues.apache.org/jira/browse/CAMEL-13741 > Project: Camel > Issue Type: Improvement > Components: camel-core >Affects Versions: 2.20.0 >Reporter: Antoine DESSAIGNE >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > When converting a {{Map}} to an {{Iterable}} the results is no longer the > same since CAMEL-11379. > Given the following context > {code} > > http://camel.apache.org/schema/spring";> > > > > [A: 'aa', B: 'bb', C: 'cc', D: 'dd'] > > > > ${body} > > > > > {code} > It produces 4 log messages in camel 2.18.3 using the converter > {{CollectionConverter.toSet(java.util.Map)}}. Using camel 2.24.1 it > produces only one message containing the whole list. This is due to > {{ObjectConverterOptimised}} calling > {{ObjectHelper.createIterable(java.lang.Object)}} which has a fallback to > {{Collections.singletonList(value)}} thus producing a single entry with the > whole Map. > The fix is probably to add in > {{ObjectHelper.createIterable(java.lang.Object)}} the following code > {code} > if (value instanceof Map) { > return ((Map)value).entrySet(); > } > {code} > but I would like to know what you think about it before doing a pull request. > Thanks -- This message was sent by Atlassian JIRA (v7.6.3#76005)