You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Sergey Zolotaryov (JIRA)" <ji...@apache.org> on 2010/04/07 11:45:08 UTC

[jira] Created: (CAMEL-2622) Invocation of hasNext() on org.apache.camel.util.ObjectHelper.createIterator(...).new Iterator() {...} return different results

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
            Priority: Minor


{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.


[jira] Updated: (CAMEL-2622) Invocation of hasNext() on org.apache.camel.util.ObjectHelper.createIterator(...).new Iterator() {...} return different results

Posted by "Sergey Zolotaryov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Zolotaryov updated CAMEL-2622:
-------------------------------------

    Attachment: patchfile.txt

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
>            Priority: Minor
>         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.


[jira] Resolved: (CAMEL-2622) Invocation of hasNext() on org.apache.camel.util.ObjectHelper.createIterator(...).new Iterator() {...} return different results

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ 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.