You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2011/04/18 15:09:07 UTC

[jira] [Created] (JENA-60) NiceIterator.andThen: remove() has minor bug

NiceIterator.andThen: remove() has minor bug
--------------------------------------------

                 Key: JENA-60
                 URL: https://issues.apache.org/jira/browse/JENA-60
             Project: Jena
          Issue Type: Bug
            Reporter: Andy Seaborne
            Assignee: christopher james dollin



regarding com.hp.hpl.jena.util.iterator.NiceIterator:

If you have a NiceIterator and you do andThen and call
it.hasNext();
it.remove();

it can try to remove() from the wrong underlying iterator. Remove should call remove() on the iterator that returned the previous next(), not current.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JENA-60) NiceIterator.andThen: remove() has minor bug

Posted by "Yonathan Randolph (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021203#comment-13021203 ] 

Yonathan Randolph commented on JENA-60:
---------------------------------------

I realized that for some iterators like FilterITerator it is impossible to call remove() after hasNext(), so I guess I shouldn't expect andThen to work when you call them in the wrong order either.

> NiceIterator.andThen: remove() has minor bug
> --------------------------------------------
>
>                 Key: JENA-60
>                 URL: https://issues.apache.org/jira/browse/JENA-60
>             Project: Jena
>          Issue Type: Bug
>            Reporter: Andy Seaborne
>            Assignee: christopher james dollin
>
> regarding com.hp.hpl.jena.util.iterator.NiceIterator:
> If you have a NiceIterator and you do andThen and call
> it.hasNext();
> it.remove();
> it can try to remove() from the wrong underlying iterator. Remove should call remove() on the iterator that returned the previous next(), not current.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (JENA-60) NiceIterator.andThen: remove() has minor bug

Posted by "Andy Seaborne (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne closed JENA-60.
-----------------------------

    
> NiceIterator.andThen: remove() has minor bug
> --------------------------------------------
>
>                 Key: JENA-60
>                 URL: https://issues.apache.org/jira/browse/JENA-60
>             Project: Jena
>          Issue Type: Bug
>            Reporter: Andy Seaborne
>            Assignee: Stephen Allen
>         Attachments: JENA-60-ARQ-r1186421.patch, JENA-60-Jena-r1186412.patch
>
>
> regarding com.hp.hpl.jena.util.iterator.NiceIterator:
> If you have a NiceIterator and you do andThen and call
> it.hasNext();
> it.remove();
> it can try to remove() from the wrong underlying iterator. Remove should call remove() on the iterator that returned the previous next(), not current.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JENA-60) NiceIterator.andThen: remove() has minor bug

Posted by "Stephen Allen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Allen updated JENA-60:
------------------------------

    Attachment: JENA-60-ARQ-r1186421.patch
                JENA-60-Jena-r1186412.patch

Attached patchs with tests to fix this issue in both Jena and ARQ (they both have concat iterators that support .remove()).
                
> NiceIterator.andThen: remove() has minor bug
> --------------------------------------------
>
>                 Key: JENA-60
>                 URL: https://issues.apache.org/jira/browse/JENA-60
>             Project: Jena
>          Issue Type: Bug
>            Reporter: Andy Seaborne
>            Assignee: christopher james dollin
>         Attachments: JENA-60-ARQ-r1186421.patch, JENA-60-Jena-r1186412.patch
>
>
> regarding com.hp.hpl.jena.util.iterator.NiceIterator:
> If you have a NiceIterator and you do andThen and call
> it.hasNext();
> it.remove();
> it can try to remove() from the wrong underlying iterator. Remove should call remove() on the iterator that returned the previous next(), not current.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (JENA-60) NiceIterator.andThen: remove() has minor bug

Posted by "Stephen Allen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stephen Allen resolved JENA-60.
-------------------------------

    Resolution: Fixed

Fixed in Jena (r1190382) and in ARQ (r1190377).
                
> NiceIterator.andThen: remove() has minor bug
> --------------------------------------------
>
>                 Key: JENA-60
>                 URL: https://issues.apache.org/jira/browse/JENA-60
>             Project: Jena
>          Issue Type: Bug
>            Reporter: Andy Seaborne
>            Assignee: Stephen Allen
>         Attachments: JENA-60-ARQ-r1186421.patch, JENA-60-Jena-r1186412.patch
>
>
> regarding com.hp.hpl.jena.util.iterator.NiceIterator:
> If you have a NiceIterator and you do andThen and call
> it.hasNext();
> it.remove();
> it can try to remove() from the wrong underlying iterator. Remove should call remove() on the iterator that returned the previous next(), not current.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (JENA-60) NiceIterator.andThen: remove() has minor bug

Posted by "Paolo Castagna (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paolo Castagna reassigned JENA-60:
----------------------------------

    Assignee: Stephen Allen  (was: christopher james dollin)
    
> NiceIterator.andThen: remove() has minor bug
> --------------------------------------------
>
>                 Key: JENA-60
>                 URL: https://issues.apache.org/jira/browse/JENA-60
>             Project: Jena
>          Issue Type: Bug
>            Reporter: Andy Seaborne
>            Assignee: Stephen Allen
>         Attachments: JENA-60-ARQ-r1186421.patch, JENA-60-Jena-r1186412.patch
>
>
> regarding com.hp.hpl.jena.util.iterator.NiceIterator:
> If you have a NiceIterator and you do andThen and call
> it.hasNext();
> it.remove();
> it can try to remove() from the wrong underlying iterator. Remove should call remove() on the iterator that returned the previous next(), not current.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira