49 |
|
* read-only mode, and then lock. When in read-only mode, they |
50 |
|
* validate only at the end of an array scan unless the element is |
51 |
|
* actually used (for example, as an argument of method equals). |
52 |
+ |
* |
53 |
+ |
* We rely on some invariants that are always true, even for field |
54 |
+ |
* reads in read-only mode that have not yet been validated: |
55 |
+ |
* - array != null |
56 |
+ |
* - count >= 0 |
57 |
|
*/ |
58 |
|
|
59 |
|
/** |
691 |
|
if (lock.getSequence() != seq) { |
692 |
|
lock.lock(); |
693 |
|
try { |
694 |
< |
return rawLastIndexOf(o, 0, count); |
694 |
> |
return rawLastIndexOf(o, count, 0); |
695 |
|
} finally { |
696 |
|
lock.unlock(); |
697 |
|
} |