Skip to content

Commit 2fec09d

Browse files
committed
Add assertions to validate parsed schema cache keys
1 parent 579d09e commit 2fec09d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/io/confluent/kafka/schemaregistry/storage/KafkaSchemaRegistry.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2893,6 +2893,8 @@ private static class RawSchema {
28932893
private final boolean normalize;
28942894

28952895
public RawSchema(Schema schema, boolean isNew, boolean normalize) {
2896+
assert schema != null && schema.getVersion() == null && schema.getId() == null;
2897+
28962898
this.schema = schema;
28972899
this.isNew = isNew;
28982900
this.normalize = normalize;

0 commit comments

Comments
 (0)