private void activateRecords(long[] stuff) {
...
api.activateRecords(Arrays.asList(specIdsToActivate));
}
Shouldn't this call to Arrays.asList return a list of Long
s? Instead it is returning a List<long[]>
public static <T> List<T> asList(T... a)
The method signature is consistent with the results, the varargs throws the entire array into the list. It's the same as new ArrayList(); list.add(myArray)
And yes, I know it's meant to be used like this: Arrays.asList(T t1, T t2, T t3)
I guess what I'm getting at, is instead of the varargs form, why can't I just have my old asList method (at least I think this is how it used to work) that would take the contents and put them individually into a list? Any other clean way of doing this?