aashish-confluent commented on code in PR #24079:
URL: https://github.com/apache/kafka/pull/24079#discussion_r4450816374
##########
clients/src/main/java/org/apache/kafka/common/serialization/ListDeserializer.java:
##########
@@ -151,15 +152,15 @@ private SerializationStrategy
parseSerializationStrategyFlag(final int serializa
return SerializationStrategy.VALUES[serializationStrategyFlag];
}
- private List<Integer> deserializeNullIndexList(final DataInputStream dis,
final int length) throws IOException {
+ private Set<Integer> deserializeNullIndexList(final DataInputStream dis,
final int length) throws IOException {
int nullIndexListSize = dis.readInt();
if (nullIndexListSize < 0) {
throw new SerializationException("Corrupted byte[]. The number of
null list entries cannot be negative.");
}
if (nullIndexListSize > length / Integer.BYTES) {
throw new SerializationException("Corrupted byte[]. The number of
null list entries cannot be larger than overall number of elements.");
}
- List<Integer> nullIndexList = new ArrayList<>(nullIndexListSize);
+ Set<Integer> nullIndexList = new HashSet<>(nullIndexListSize);
Review Comment:
Done, Thanks
--
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]