docs: @Override
  	public final TypeSerializer<T> restoreSerializer() {
  		if (serializer == null) {
  			throw new IllegalStateException(
  					"Trying to restore the prior serializer via TypeSerializerConfigSnapshot, " +
  					"but the prior serializer has not been set.");
  		}
  		else if (serializer instanceof UnloadableDummyTypeSerializer) {
  			Throwable originalError = ((UnloadableDummyTypeSerializer<?>) serializer).getOriginalError();
  
  			throw new IllegalStateException(
  					"Could not Java-deserialize TypeSerializer while restoring checkpoint metadata for serializer " +
  					"snapshot '" + getClass().getName() + "'. " +
  					"Please update to the TypeSerializerSnapshot interface that removes Java Serialization to avoid " +
  					"this problem in the future.", originalError);
  		} else {
  			return this.serializer;
  		}
  	}