code: public static void notEmpty(Object[] arr, String name) {
      notNull(arr, name);
  
      if (arr.length == 0) {
        throw new IllegalArgumentException(name + "must not be empty");
      }
    }
docs: Checks that a given array is not null and not empty.
  
  @param arr    The array to check
  @param name The name of the array to use when raising an error.
  @throws IllegalArgumentException If the collection was null or empty.