code: @SuppressWarnings("unchecked")
  	@Contract(pure = true)
  	@NotNull
  	public static <T> Promise<T[]> toArray(@NotNull Class<T> type, @NotNull Promise<? extends T> promise1) {
  		return promise1.map(value -> {
  			@NotNull T[] array = (T[]) Array.newInstance(type, 1);
  			array[0] = value;
  			return array;
  		});
  	}
docs: Returns an array with {@code promise1} result.