jdk/src/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java
changeset 5169 a4fcbe0e04e3
parent 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
4241:7d4f50f3806c 5169:a4fcbe0e04e3
    55     private final Object[] array;
    55     private final Object[] array;
    56 
    56 
    57     private long rawIndex(int i) {
    57     private long rawIndex(int i) {
    58         if (i < 0 || i >= array.length)
    58         if (i < 0 || i >= array.length)
    59             throw new IndexOutOfBoundsException("index " + i);
    59             throw new IndexOutOfBoundsException("index " + i);
    60         return base + i * scale;
    60         return base + (long) i * scale;
    61     }
    61     }
    62 
    62 
    63     /**
    63     /**
    64      * Creates a new AtomicReferenceArray of given length.
    64      * Creates a new AtomicReferenceArray of given length.
    65      * @param length the length of the array
    65      * @param length the length of the array