maedhroz commented on code in PR #3274:
URL: https://github.com/apache/cassandra/pull/3274#discussion_r1591719682
##########
src/java/org/apache/cassandra/net/Message.java:
##########
@@ -862,9 +879,9 @@ private Header deserializeHeader(DataInputPlus in,
InetAddressAndPort peer, int
long currentTimeNanos = approxTime.now();
MonotonicClockTranslation timeSnapshot = approxTime.translate();
long creationTimeNanos = calculateCreationTimeNanos(in.readInt(),
timeSnapshot, currentTimeNanos);
- long expiresAtNanos = getExpiresAtNanos(creationTimeNanos,
currentTimeNanos, TimeUnit.MILLISECONDS.toNanos(in.readUnsignedVInt()));
- Verb verb = Verb.fromId(in.readUnsignedVInt32());
- int flags = in.readUnsignedVInt32();
+ long expiresAtNanos = getExpiresAtNanos(creationTimeNanos,
TimeUnit.MILLISECONDS.toNanos(in.readUnsignedVInt()));
+ Verb verb = Verb.fromId(Ints.checkedCast(in.readUnsignedVInt()));
+ int flags = Ints.checkedCast(in.readUnsignedVInt());
Review Comment:
nit: Is `in.readUnsignedVInt32()` not equivalent to
`Ints.checkedCast(in.readUnsignedVInt())`?
--
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]