- ArrayList<int[]> copy = new ArrayList<>(hiddenColumns.size());
- for (int i = 0, j = hiddenColumns.size(); i < j; i++)
+ int size = 0;
+ if (hiddenColumns != null)
+ {
+ size = hiddenColumns.size();
+ }
+ ArrayList<int[]> copy = new ArrayList<>(size);
+
+ for (int i = 0, j = size; i < j; i++)