code: private void readObject(ObjectInputStream s)
           throws IOException, ClassNotFoundException, InvalidObjectException
      {
          s.defaultReadObject();
          if (firstDayOfWeek == null) {
              throw new InvalidObjectException("firstDayOfWeek is null");
          }
  
          if (minimalDays < 1 || minimalDays > 7) {
              throw new InvalidObjectException("Minimal number of days is invalid");
          }
      }
docs: Restore the state of a WeekFields from the stream.
  Check that the values are valid.
  
  @param s the stream to read
  @throws InvalidObjectException if the serialized object has an invalid
  value for firstDayOfWeek or minimalDays.
  @throws ClassNotFoundException if a class cannot be resolved