@Contract(pure=true)
  public static <T> T @NotNull [] mergeArrays(T @NotNull [] a1, T @NotNull [] a2) {
    if (a1.length == 0) {
      return a2;
    }
    if (a2.length == 0) {
      return a1;
    }

    Class<T> class1 = getComponentType(a1);
    Class<T> class2 = getComponentType(a2);
    Class<T> aClass = class1.isAssignableFrom(class2) ? class1 : class2;

    T[] result = newArray(aClass, a1.length + a2.length);
    System.arraycopy(a1, 0, result, 0, a1.length);
    System.arraycopy(a2, 0, result, a1.length, a2.length);
    return result;
  }
@Contract(pure=true)
  public static <T> T @NotNull [] mergeArrays(T @NotNull [] a1, T @NotNull [] a2)