[ https://issues.apache.org/activemq/browse/CAMEL-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-2622. -------------------------------- Resolution: Fixed Fix Version/s: 2.3.0 Assignee: Claus Ibsen trunk: 931494. Thanks for the patch. > Invocation of hasNext() on > org.apache.camel.util.ObjectHelper.createIterator(...).new Iterator<Node>() > {...} return different results > ------------------------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-2622 > URL: https://issues.apache.org/activemq/browse/CAMEL-2622 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.2.0, 2.3.0 > Reporter: Sergey Zolotaryov > Assignee: Claus Ibsen > Priority: Minor > Fix For: 2.3.0 > > Attachments: patchfile.txt > > > {code} > public boolean hasNext() { > // empty string should not be regarded as having next > return ++idx == 0 && ObjectHelper.isNotEmpty(s); > } > public String next() { > return s; > } > {code} > This is incorrect. Should be: > {code} > public boolean hasNext() { > // empty string should not be regarded as having next > return idx+1 == 0 && ObjectHelper.isNotEmpty(s); > } > public String next() { > idx++; > return s; > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.