smiklosovic commented on code in PR #4411:
URL: https://github.com/apache/cassandra/pull/4411#discussion_r2454625820
##########
src/java/org/apache/cassandra/schema/Types.java:
##########
@@ -487,7 +555,20 @@ public Types deserialize(String keyspace, DataInputPlus
in, Version version) thr
List<String> fieldTypes = new ArrayList<>(fieldTypeSize);
for (int x = 0; x < fieldTypeSize; x++)
fieldTypes.add(in.readUTF());
- builder.add(name, fieldNames, fieldTypes);
+ String comment = EMPTY_COMMENT;
+ String securityLabel = EMPTY_SECURITY_LABEL;
+ List<String> fieldComments = EMPTY_FIELD_COMMENTS;
Review Comment:
so, what you did here is that you have replaced this by _static_ class
variable of `new ArrayList<>()` type. So upon deserialization you will use
that static variable and you go with it to `deserializeFieldMetadata`. There
you add comments to _static variable_. Then upon next deserialisation, you
would reuse that array again, because it is static?
You do not want to do this. What you want to do is to break
`deserializeFieldMetadata` into two methods. Each returning List<String> and
you return `List.of(EMPTY_COMMENT)` in case there are no comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]