resources/src/main/java/org/robolectric/res/android/ByteBucketArray.java
final T get(int index) {
    if (index >= size()) {
      return mDefault;
    }

//    byte bucketIndex = static_cast<byte>(index) >> 4;
    byte bucketIndex = (byte) (index >> 4);
    T[] bucket = (T[]) mBuckets[bucketIndex];
    if (bucket == null) {
      return mDefault;
    }
    T t = bucket[0x0f & ((byte) index)];
    return t == null ? mDefault : t;
  }
final T get(int index) {
    if (index >= size()) {
      return mDefault;
    }

//    byte bucketIndex = static_cast<byte>(index) >> 4;
    byte bucketIndex = (byte) (index >> 4);
    T[] bucket = (T[]) mBuckets[bucketIndex];
    if (bucket == null) {
      return mDefault;
    }
    T t = bucket[0x0f & ((byte) index)];
    return t == null ? mDefault : t;
  }
}