RFR: 8155600 - Performance optimization of Arrays.asList().iterator()
Remi Forax
forax at univ-mlv.fr
Fri Apr 29 14:20:57 UTC 2016
Hi all,
Just nitpicking,
i wonder if it's not better to use the Doug Lea's convention in next()
i.e. rename i to cursor to shadow the field cursor
public E next() {
int cursor = this.cursor;
if (cursor >= a.length) {
throw new NoSuchElementException();
}
this.cursor = cursor + 1;
return a[cursor];
}
also ArrayItr should be marked final.
regards,
Rémi
----- Mail original -----
> De: "Claes Redestad" <claes.redestad at oracle.com>
> À: "Tagir F. Valeev" <amaembo at gmail.com>, "Aleksey Shipilev" <aleksey.shipilev at oracle.com>
> Cc: "core-libs-dev" <core-libs-dev at openjdk.java.net>
> Envoyé: Vendredi 29 Avril 2016 15:38:48
> Objet: Re: RFR: 8155600 - Performance optimization of Arrays.asList().iterator()
>
> On 2016-04-29 15:31, Tagir F. Valeev wrote:
> > Hello!
> >
> > Thank you for comments. Update:
> > http://cr.openjdk.java.net/~tvaleev/webrev/8155600/r3/
>
> Looks good.
>
> Thanks!
>
> /Claes
>
More information about the core-libs-dev
mailing list