chaokunyang commented on code in PR #1472:
URL: https://github.com/apache/incubator-fury/pull/1472#discussion_r1554641104


##########
java/fury-core/src/main/java/org/apache/fury/memory/MemoryBuffer.java:
##########
@@ -2318,6 +2205,37 @@ public float readFloat() {
     }
   }
 
+  // Reduce method body for better inline in the caller.
+  @CodegenInvoke
+  public float readFloatOnLE() {
+    int readerIdx = readerIndex;
+    // use subtract to avoid overflow
+    int remaining = size - readerIdx;
+    if (remaining < 4) {
+      throw new IndexOutOfBoundsException(

Review Comment:
   This is temprary , it will be replaced by `streamReader.fillBuffer` in 
#1451. The exception will be trown in `DoundChecker`



-- 
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: commits-unsubscr...@fury.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org

Reply via email to