private static boolean arraysEqual(final int[] newArray, final int[] oldArray) {
    if (oldArray == null || newArray.length != oldArray.length) {
      return false;
    }
    for(int i=0; i<oldArray.length; i++) {
      if (newArray [i] != oldArray [i]) {
        return false;
      }
    }
    return true;
  }
private static boolean arraysEqual(final int[] newArray, final int[] oldArray)