Hi Claes,
lastIndexOf of SubList should call lastIndexOfRange (that should be renamed) 
instead of indexOfRange.

in ArrayList.equals(), i wonder if the test 'if (o.getClass() == 
ArrayList.class) {' should not be moved in front of the instanceof test, so the 
JIT may be able to not include a test to ArrayList when doing the instanceof ??

Rémi

----- Mail original -----
> De: "Claes Redestad" <claes.redes...@oracle.com>
> À: "core-libs-dev" <core-libs-dev@openjdk.java.net>
> Envoyé: Vendredi 11 Mai 2018 15:55:48
> Objet: RFR: 8196340: (coll) Examine overriding inherited methods in ArrayList 
> and ArrayList.SubList

> Hi,
> 
> ArrayList doesn't override AbstracList#equals, and ArrayList$SubList
> doesn't override indexOf and equals. This provides specialized and more
> efficient implementations.
> 
> Webrev: http://cr.openjdk.java.net/~redestad/8196340/open.00/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8196340
> 
> Testing: passed all jdk-tier1 tests
> 
> /Claes

Reply via email to