@Test public void nullToPrimitiveCreatesEmptyPrimitiveLongArray() { assertArrayEquals(new long[0], toPrimitive(null)); }
@SuppressWarnings("PMD.AvoidArrayLoops") public static long[] toPrimitive(Long[] array) { if (array == null || array.length == 0) { return EMPTY_LONG_ARRAY; } final long[] result = new long[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; }
ArrayUtils { @SuppressWarnings("PMD.AvoidArrayLoops") public static long[] toPrimitive(Long[] array) { if (array == null || array.length == 0) { return EMPTY_LONG_ARRAY; } final long[] result = new long[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } }
ArrayUtils { @SuppressWarnings("PMD.AvoidArrayLoops") public static long[] toPrimitive(Long[] array) { if (array == null || array.length == 0) { return EMPTY_LONG_ARRAY; } final long[] result = new long[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } private  ArrayUtils(); }
ArrayUtils { @SuppressWarnings("PMD.AvoidArrayLoops") public static long[] toPrimitive(Long[] array) { if (array == null || array.length == 0) { return EMPTY_LONG_ARRAY; } final long[] result = new long[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } private  ArrayUtils(); @SuppressWarnings("PMD.AvoidArrayLoops") static Long[] toObject(long[] array); @SuppressWarnings("PMD.AvoidArrayLoops") static long[] toPrimitive(Long[] array); }
ArrayUtils { @SuppressWarnings("PMD.AvoidArrayLoops") public static long[] toPrimitive(Long[] array) { if (array == null || array.length == 0) { return EMPTY_LONG_ARRAY; } final long[] result = new long[array.length]; for (int i = 0; i < array.length; i++) { result[i] = array[i]; } return result; } private  ArrayUtils(); @SuppressWarnings("PMD.AvoidArrayLoops") static Long[] toObject(long[] array); @SuppressWarnings("PMD.AvoidArrayLoops") static long[] toPrimitive(Long[] array);  }