code: private void readObject(ObjectInputStream in)
          throws IOException, ClassNotFoundException {
          in.defaultReadObject();
          severity = SEVERITY_INFO;
          summary = null;
          detail = null;
          int ordinal = in.readInt();
          if (ordinal == SEVERITY_INFO.getOrdinal()) {
              severity = FacesMessage.SEVERITY_INFO;
          } else if (ordinal == SEVERITY_WARN.getOrdinal()) {
              severity = FacesMessage.SEVERITY_WARN;
          } else if (ordinal == SEVERITY_ERROR.getOrdinal()) {
              severity = FacesMessage.SEVERITY_ERROR;
          } else if (ordinal == SEVERITY_FATAL.getOrdinal()) {
              severity = FacesMessage.SEVERITY_FATAL;
          }
          summary = (String) in.readObject();
          detail = (String) in.readObject();
          rendered = (Boolean) in.readObject();
      }
docs: <p>Reconstruct {@link javax.faces.application.FacesMessage} from
  serialized artifacts.</p>