jpountz commented on code in PR #1047: URL: https://github.com/apache/lucene/pull/1047#discussion_r929854326
########## 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: We could make `len` a long and avoid the unchecked cast, couldn't we? -- 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