code: void preProcessOperation(UpdateAttributesOperation operation) throws StreamSegmentSealedException, StreamSegmentMergedException,
              BadAttributeUpdateException {
          ensureSegmentId(operation);
          if (this.merged) {
              // We do not allow any operation after merging (since after merging the Segment disappears).
              throw new StreamSegmentMergedException(this.name);
          }
  
          if (this.sealed) {
              throw new StreamSegmentSealedException(this.name);
          }
  
          if (!this.recoveryMode) {
              preProcessAttributes(operation.getAttributeUpdates());
          }
      }
docs: Pre-processes a UpdateAttributesOperation.
  After this method returns, the given operation will have its AttributeUpdates set to the current values of
  those attributes.
  
  @param operation The operation to pre-process.
  @throws StreamSegmentSealedException If the Segment is sealed.
  @throws StreamSegmentMergedException If the Segment is merged into another.
  @throws IllegalArgumentException     If the operation is for a different Segment.
  @throws BadAttributeUpdateException  If at least one of the AttributeUpdates is invalid given the current attribute
  values of the segment.