smiklosovic commented on code in PR #4411:
URL: https://github.com/apache/cassandra/pull/4411#discussion_r2452122933


##########
src/java/org/apache/cassandra/schema/Types.java:
##########
@@ -487,7 +553,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 = new ArrayList<>();

Review Comment:
   @jyothsnakonisa  you can also create a constant of empty list for empty 
field comments and security  fields and reuse it the same way you do for empty 
comment and security label. Because as of now every single time you deserialize 
you are creating a new array list unnecessarily.



-- 
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]

Reply via email to