Class CompatibilityResult

java.lang.Object
io.confluent.kafka.schemaregistry.type.logical.policy.CompatibilityResult

public class CompatibilityResult extends Object
The outcome of a LogicalTypeChecker.compare(io.confluent.kafka.schemaregistry.type.logical.policy.LogicalTypeChecker.Mode, io.confluent.kafka.schemaregistry.type.logical.LogicalType, io.confluent.kafka.schemaregistry.type.logical.LogicalType) call.

All violations are collected rather than failing on the first one, so a caller can present the complete set of problems with a schema change in one pass.

  • Method Details

    • compatible

      public static CompatibilityResult compatible()
      Returns a result with no violations.
    • of

      public static CompatibilityResult of(List<Incompatibility> incompatibilities)
      Returns a result carrying the given violations, or compatible() if there are none.
    • isCompatible

      public boolean isCompatible()
    • getIncompatibilities

      public List<Incompatibility> getIncompatibilities()
      The violations found, in the order they were discovered. Empty when compatible.
    • describe

      public String describe()
      Renders every violation as a single newline-separated string, suitable for an error message. Returns the empty string when compatible.
    • toString

      public String toString()
      Overrides:
      toString in class Object