Fix Schema Field Null Issue (#16510)

This commit is contained in:
Mohit Yadav 2024-06-03 13:03:26 +05:30 committed by GitHub
parent 5a457d37fe
commit 022772943f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -410,9 +410,9 @@ public class TopicRepository extends EntityRepository<Topic> {
updateSchemaFields(
"messageSchema.schemaFields",
original.getMessageSchema() == null
? null
: original.getMessageSchema().getSchemaFields(),
updated.getMessageSchema().getSchemaFields(),
? new ArrayList<>()
: listOrEmpty(original.getMessageSchema().getSchemaFields()),
listOrEmpty(updated.getMessageSchema().getSchemaFields()),
EntityUtil.schemaFieldMatch);
}
recordChange("topicConfig", original.getTopicConfig(), updated.getTopicConfig());
@ -489,7 +489,10 @@ public class TopicRepository extends EntityRepository<Topic> {
if (updated.getChildren() != null && stored.getChildren() != null) {
String childrenFieldName = EntityUtil.getFieldName(fieldName, updated.getName());
updateSchemaFields(
childrenFieldName, stored.getChildren(), updated.getChildren(), fieldMatch);
childrenFieldName,
listOrEmpty(stored.getChildren()),
listOrEmpty(updated.getChildren()),
fieldMatch);
}
}