imbajin commented on code in PR #2861:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2861#discussion_r2313265321


##########
hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/Query.java:
##########
@@ -180,7 +180,9 @@ public long offset() {
     }
 
     public void offset(long offset) {
-        E.checkArgument(offset >= 0L, "Invalid offset %s", offset);
+        if (offset < 0L) {

Review Comment:
   **Performance optimization concern**: While avoiding autoboxing is good, 
this pattern is harder to read and maintain. Consider using a static helper 
method instead:
   
   ```java
   private static void checkNonNegative(long value, String message, Object... 
args) {
       if (value < 0L) {
           E.checkArgument(false, message, args);
       }
   }
   ```
   
   Then call: `checkNonNegative(offset, "Invalid offset %s", offset);`



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