commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@btopenworld.com>
Subject Re: [collections] [patch] ArrayIterator#hasNext bug
Date Sat, 26 Apr 2003 10:20:40 GMT
I have checked the code and the test suite and all looks fine to me. Can you
provide any more info?

Stephen

----- Original Message -----
From: "Neil O'Toole" <neilotoole@yahoo.com>
To: <commons-dev@jakarta.apache.org>
Sent: Saturday, April 26, 2003 4:50 AM
Subject: [collections] [patch] ArrayIterator#hasNext bug


> bug in ArrayIterator#hasNext. Currently:
>
>     public boolean hasNext() {
>         return (index <= endIndex);
>     }
>
> should be:
>
>     public boolean hasNext() {
>         return (index <= endIndex);
>     }
>
> I don't currently have the configuration on this machine to run the
> test suite, so I'd appreciate it if the commmitter could run the suite
> in case this messes anything else up (and maybe add a test case for
> this??).
>
> - Neil
>
>
>


----------------------------------------------------------------------------
----


> Index: ArrayIterator.java
> ===================================================================
> RCS file:
x:/apps/cvsnt/cvs_repository/main/commons-collections-20030425/src/java/org/
apache/commons/collections/iterators/ArrayIterator.java,v
> retrieving revision 1.1
> diff -u -r1.1 ArrayIterator.java
> --- ArrayIterator.java 26 Apr 2003 03:37:40 -0000 1.1
> +++ ArrayIterator.java 26 Apr 2003 03:42:22 -0000
> @@ -176,7 +176,7 @@
>       *  @return true if there is a next element to return
>       */
>      public boolean hasNext() {
> -        return (index < endIndex);
> +        return (index <= endIndex);
>      }
>
>      /**
>
>


----------------------------------------------------------------------------
----


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message