docs: @Nonnull
  	public final TypeSerializer<T> currentSchemaSerializer() {
  		if (registeredSerializer != null) {
  			checkState(
  				!isRegisteredWithIncompatibleSerializer,
  				"Unable to provide a serializer with the current schema, because the restored state was " +
  					"registered with a new serializer that has incompatible schema.");
  
  			return registeredSerializer;
  		}
  
  		// if we are not yet registered with a new serializer,
  		// we can just use the restore serializer to read / write the state.
  		return previousSchemaSerializer();
  	}