easyice commented on code in PR #13376: URL: https://github.com/apache/lucene/pull/13376#discussion_r1605011950
########## lucene/core/src/java/org/apache/lucene/store/DataOutput.java: ########## @@ -328,9 +328,12 @@ public void writeSetOfStrings(Set<String> set) throws IOException { /** * Encode integers using group-varint. It uses {@link DataOutput#writeVInt VInt} to encode tail * values that are not enough for a group. we need a long[] because this is what postings are - * using, all longs are actually required to be integers. + * using, all longs are actually required to be integers. Negative numbers are supported, but + * should be avoided. * - * @param values the values to write + * @param values the values to write. Note: if original integer is negative, it should also be + * negative as long, not positive which is greater than Integer.MAX_VALUE, that will cause + * integer overflow exception in {@link Math#toIntExact(long)}. Review Comment: This change has reverted, there is no change in `DataOutput` in current fix approach. -- 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