-
Enhancement
-
Resolution: Not an Issue
-
P4
-
None
-
1.4.1
-
x86
-
windows_xp
Name: nt126004 Date: 02/14/2003
FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
A DESCRIPTION OF THE PROBLEM :
The RangeCheck method of ArrayList tests for the condition
index < 0 and throws an IndexOutOfBounds exception if
violated. However, any array access with index < 0 will
throw an equivalent ArrayIndexOutOfBounds exception. Common
operations in ArrayList such as get and set immediately
follow the call to RangeCheck with an array access. This
makes the test in RangeCheck redundant and causes an
unnecessary test to be done for these very frequently called
methods.
REPRODUCIBILITY :
This bug can be reproduced always.
(Review ID: 181290)
======================================================================
- relates to
-
JDK-5103956 (coll) Suggested improvement to speed up ArrayList<E> get and set calls
-
- Closed
-