[jira] [Commented] (COLLECTIONS-459) ArrayIterator & ObjectArrayIterator - do they need setters?`

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (COLLECTIONS-459) ArrayIterator & ObjectArrayIterator - do they need setters?`

Jerome Wolff (Jira)

    [ https://issues.apache.org/jira/browse/COLLECTIONS-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13657462#comment-13657462 ]

Thomas Neidhart commented on COLLECTIONS-459:

The respective *ListIterator classes seem to have been copied as they contain default constructors with the same javadoc, i.e. refer to a setArray method, although there is no such method.

I am going to remove the default constructors as they render these classes useless (they act as an empty iterator that can not be changed).

> ArrayIterator & ObjectArrayIterator - do they need setters?`
> ------------------------------------------------------------
>                 Key: COLLECTIONS-459
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-459
>             Project: Commons Collections
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 4.0
> ArrayIterator & ObjectArrayIterator both have methods to set the array separately from the ctor.
> However the method does not allow the same flexibility as the ctor, as it does not allow the start or end indexes to be set.
> Is there really a use-case for these setters? If not, all the fields apart from index could be made final, which would make thread safety (and testing) easier.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira