private void activateRecords(long[] stuff) {
...
api.activateRecords(Arrays.asList(specIdsToActivate));
}
Should this call to Arrays.asList return a list of Longs? Instead, it returnsList<long[]>
public static <T> List<T> asList(T... a)
The signature of the method is consistent with the results, varargs throws the entire array into a list. This is the same as new ArrayList(); list.add(myArray)And yes, I know that it needs to be used as follows:Arrays.asList(T t1, T t2, T t3)
I assume that I get, instead of the varargs form, why can't I just use my old asList method (at least I think it worked that way) to take the contents and put them individually in a list? Any other clean way to do this?
source
share