iverase commented on a change in pull request #2094: URL: https://github.com/apache/lucene-solr/pull/2094#discussion_r529536245
########## File path: lucene/core/src/java/org/apache/lucene/codecs/CodecUtil.java ########## @@ -570,6 +571,23 @@ static void writeCRC(IndexOutput output) throws IOException { if ((value & 0xFFFFFFFF00000000L) != 0) { throw new IllegalStateException("Illegal CRC-32 checksum: " + value + " (resource=" + output + ")"); } - output.writeLong(value); + writeChecksum(output, value); } + + private static int readVersion(DataInput in) throws IOException { + return EndiannessReverserUtil.readInt(in); + } + + private static void writeVersion(DataOutput out, int version) throws IOException { + EndiannessReverserUtil.writeInt(out, version); + } + + private static long readChecksum(DataInput in) throws IOException { + return EndiannessReverserUtil.readLong(in); + } + + private static void writeChecksum(DataOutput out, long checksum) throws IOException { + EndiannessReverserUtil.writeLong(out, checksum); + } Review comment: yes, that make sense. ---------------------------------------------------------------- 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. 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