easyice commented on code in PR #13376:
URL: https://github.com/apache/lucene/pull/13376#discussion_r1604988872


##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -118,6 +120,13 @@ private static int numBytes(int v) {
     return Integer.BYTES - (Integer.numberOfLeadingZeros(v | 1) >> 3);
   }
 
+  private static int toInt(long value) {
+    if (value < 0 || value > 0xFFFFFFFFL) {
+      throw new ArithmeticException("integer overflow");
+    }

Review Comment:
   Great!



-- 
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: issues-unsubscr...@lucene.apache.org

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


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

Reply via email to