Apache Solr open-source search software
LUCENE-9822: Assert that ForUtil.BLOCK_SIZE can be PFOR-encoded in a single byte
Robert Muir8e337ab63fac
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txtindex 9b6bea99c38..d906a699072 100644--- a/lucene/CHANGES.txt+++ b/lucene/CHANGES.txt@@ -266,6 +266,8 @@ Other* LUCENE-9773: Upgrade icu to 68.2 (Robert Muir)+* LUCENE-9822: Add assertion to PFOR exception encoding, documenting the BLOCK_SIZE assumption. (Greg Miller)+======================= Lucene 8.9.0 =======================API Changesdiff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/PForUtil.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/PForUtil.javaindex 17af2e5118e..4376036ec3d 100644--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/PForUtil.java+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/PForUtil.java@@ -37,6 +37,7 @@ final class PForUtil {private final ForUtil forUtil;PForUtil(ForUtil forUtil) {+ assert ForUtil.BLOCK_SIZE <= 256 : "blocksize must fit in one byte. got " + ForUtil.BLOCK_SIZE;this.forUtil = forUtil;}