diff options
Diffstat (limited to 'core/java/android/util/LongSparseLongArray.java')
| -rw-r--r-- | core/java/android/util/LongSparseLongArray.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/core/java/android/util/LongSparseLongArray.java b/core/java/android/util/LongSparseLongArray.java index f167f009a942..8dcdb4026246 100644 --- a/core/java/android/util/LongSparseLongArray.java +++ b/core/java/android/util/LongSparseLongArray.java @@ -16,13 +16,14 @@ package android.util; -import android.annotation.UnsupportedAppUsage; - import com.android.internal.util.ArrayUtils; import com.android.internal.util.GrowingArrayUtils; +import android.annotation.UnsupportedAppUsage; import libcore.util.EmptyArray; +import java.util.Arrays; + /** * Map of {@code long} to {@code long}. Unlike a normal array of longs, there * can be gaps in the indices. It is intended to be more memory efficient than using a @@ -172,10 +173,6 @@ public class LongSparseLongArray implements Cloneable { * key.</p> */ public long keyAt(int index) { - if (index >= mSize) { - // The array might be slightly bigger than mSize, in which case, indexing won't fail. - throw new ArrayIndexOutOfBoundsException(index); - } return mKeys[index]; } @@ -191,10 +188,6 @@ public class LongSparseLongArray implements Cloneable { * associated with the largest key.</p> */ public long valueAt(int index) { - if (index >= mSize) { - // The array might be slightly bigger than mSize, in which case, indexing won't fail. - throw new ArrayIndexOutOfBoundsException(index); - } return mValues[index]; } |
