ctubbsii commented on code in PR #3135:
URL: https://github.com/apache/thrift/pull/3135#discussion_r2093580755


##########
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:
   Alternatively, just make the method final, since it depends so much on the 
internal implementation.



##########
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:
   Alternatively, just make the new method final, since it depends so much on 
the internal implementation.



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