jpountz commented on code in PR #1047:
URL: https://github.com/apache/lucene/pull/1047#discussion_r931121046


##########
lucene/core/src/java/org/apache/lucene/util/fst/BytesStore.java:
##########
@@ -179,6 +179,30 @@ void writeBytes(long dest, byte[] b, int offset, int len) {
     }
   }
 
+  @Override
+  public void copyBytes(DataInput input, long numBytes) throws IOException {
+    assert numBytes >= 0 : "numBytes=" + numBytes;
+    assert input != null;
+    int len = (int) numBytes;

Review Comment:
   Thanks, I like that the cast is safe now because the number we're casting is 
guaranteed to fit in a 32-bits integer.



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