Class PreviewFeatureDiffEventDecorator

java.lang.Object
software.amazon.smithy.diff.PreviewFeatureDiffEventDecorator
All Implemented Interfaces:
DiffEventDecorator

public final class PreviewFeatureDiffEventDecorator extends Object implements DiffEventDecorator
Downgrades backward-incompatible diff events from ERROR or DANGER to WARNING when they occur on a shape governed by a preview unstable feature.

An event is downgraded only when its shape is owned by a preview feature (resolved via UnstableFeatureIndex) in both models it appears in.

  • Constructor Details

    • PreviewFeatureDiffEventDecorator

      public PreviewFeatureDiffEventDecorator()
  • Method Details

    • decorate

      public ValidationEvent decorate(Differences differences, ValidationEvent event)
      Description copied from interface: DiffEventDecorator
      Takes a diff event and potentially transforms it, returning the same event if this decorator does not apply.
      Specified by:
      decorate in interface DiffEventDecorator
      Parameters:
      differences - The differences between the old and new models being evaluated.
      event - The event to decorate.
      Returns:
      Returns the decorated event or the original one if no decoration took place.