static <T> T[] reverse(T[] array) {
		int i;
		T temp;
		for (i = 0; i < array.length / 2; i++) {
			temp = array[i];
			array[i] = array[array.length - i - 1];
			array[array.length - i - 1] = temp;
		}
		return array;
	}
in place reverse of array

@param array array to reverse
@param <T>
@return reversed array
src/main/java/dev/jbang/net/TrustedSources.java