Maxwell-Guo commented on code in PR #2368:
URL: https://github.com/apache/cassandra/pull/2368#discussion_r1223894641


##########
src/java/org/apache/cassandra/io/util/TrackedDataInputPlus.java:
##########
@@ -49,53 +66,61 @@ public void reset(long count)
 
     public boolean readBoolean() throws IOException
     {
+        checkCanRead(1);

Review Comment:
   I agree with your point of view. From the perspective of code readability, 
TypeSizes.BOOL_SIZE is definitely much better than hard code 1.
   What I said above means that if the existing code is already written as 
1/4/8, our newly added code also fills in 1/4/8, then it just echoes back and 
forth, so the readability is not bad.
   Of course, if Jacek is willing to change the existing numbers to TypeSizes, 
I definitely support your point of view.



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