@SuppressWarnings("unchecked")
  public static <T> T[] emptyArray(Class<T> kind) {
    if (kind == Object.class) {
      return (T[]) EmptyArray.OBJECT;
    }

    int bucket = (kind.hashCode() & 0x7FFFFFFF) % CACHE_SIZE;
    Object cache = sCache[bucket];

    if (cache == null || cache.getClass().getComponentType() != kind) {
      cache = Array.newInstance(kind, 0);
      sCache[bucket] = cache;

      // Log.e("cache", "new empty " + kind.getName() + " at " + bucket);
    }

    return (T[]) cache;
  }
Returns an empty array of the specified type. The intent is that it will return the same empty
array every time to avoid reallocation, although this is not guaranteed.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java