Browse Source

MINOR; Provide static constants with lowest and highest supported versions alongside with the schema (#8916)

Reviewers: Colin P. McCabe <cmccabe@apache.org>
pull/9013/head
David Jacot 4 years ago committed by GitHub
parent
commit
c0bcabcc9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      generator/src/main/java/org/apache/kafka/message/SchemaGenerator.java

4
generator/src/main/java/org/apache/kafka/message/SchemaGenerator.java

@ -348,5 +348,9 @@ final class SchemaGenerator { @@ -348,5 +348,9 @@ final class SchemaGenerator {
buffer.decrementIndent();
buffer.printf("};%n");
buffer.printf("%n");
buffer.printf("public static final short LOWEST_SUPPORTED_VERSION = %d;%n", versions.lowest());
buffer.printf("public static final short HIGHEST_SUPPORTED_VERSION = %d;%n", versions.highest());
buffer.printf("%n");
}
}

Loading…
Cancel
Save