code: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
          in.defaultReadObject();
          if (choiceLimits.length != choiceFormats.length) {
              throw new InvalidObjectException(
                      "limits and format arrays of different length.");
          }
      }
docs: After reading an object from the input stream, do a simple verification
  to maintain class invariants.
  @throws InvalidObjectException if the objects read from the stream is invalid.