keith-turner commented on code in PR #3135:
URL: https://github.com/apache/thrift/pull/3135#discussion_r2093586428


##########
lib/java/src/main/java/org/apache/thrift/server/AbstractNonblockingServer.java:
##########
@@ -351,7 +359,13 @@ public boolean read() {
 
           // if this frame will push us over the memory limit, then return.
           // with luck, more memory will free up the next time around.
-          if (readBufferBytesAllocated.get() + frameSize > 
MAX_READ_BUFFER_BYTES) {
+          long currentAllocated = readBufferBytesAllocated.get();

Review Comment:
   made it final which makes it safer to call the getter



-- 
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: notifications-unsubscr...@thrift.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to