You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2020/11/30 12:37:01 UTC

[lucene-solr] branch branch_8x updated: LUCENE-9624: fix duplicate compute on maxUnpatchedValue (#2106)

This is an automated email from the ASF dual-hosted git repository.

jpountz pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new e6af255  LUCENE-9624: fix duplicate compute on maxUnpatchedValue (#2106)
e6af255 is described below

commit e6af255e67bde552a62f266a028e2b652cedc518
Author: gf2121 <52...@users.noreply.github.com>
AuthorDate: Mon Nov 30 20:35:15 2020 +0800

    LUCENE-9624: fix duplicate compute on maxUnpatchedValue (#2106)
    
    Co-authored-by: 郭峰 <gu...@bytedance.com>
---
 lucene/core/src/java/org/apache/lucene/codecs/lucene84/PForUtil.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene84/PForUtil.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene84/PForUtil.java
index 81fab5e..ad0d600 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene84/PForUtil.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene84/PForUtil.java
@@ -71,7 +71,7 @@ final class PForUtil {
     if (numExceptions > 0) {
       int exceptionCount = 0;
       for (int i = 0; i < ForUtil.BLOCK_SIZE; ++i) {
-        if (longs[i] > (1L << patchedBitsRequired) - 1) {
+        if (longs[i] > maxUnpatchedValue) {
           exceptions[exceptionCount*2] = (byte) i;
           exceptions[exceptionCount*2+1] = (byte) (longs[i] >>> patchedBitsRequired);
           longs[i] &= maxUnpatchedValue;