You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2026/03/25 23:19:56 UTC

(lucene) branch branch_10x updated: Fix existential quantification bug in caller checks (#15878)

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

uschindler pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_10x by this push:
     new c4b3e06f681 Fix existential quantification bug in caller checks (#15878)
c4b3e06f681 is described below

commit c4b3e06f6811e6263d676a8590084e6260418353
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Thu Mar 26 00:18:28 2026 +0100

    Fix existential quantification bug in caller checks (#15878)
---
 lucene/CHANGES.txt                                                   | 5 ++++-
 .../core/src/java/org/apache/lucene/internal/tests/TestSecrets.java  | 4 ++--
 .../apache/lucene/internal/vectorization/VectorizationProvider.java  | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index f52dba7147e..2c16cab4fcd 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -85,7 +85,7 @@ Bug Fixes
 * GITHUB#12419, GITHUB#15119, GITHUB#15864: Fix circular dependency deadlock in
   TestSecrets initialization (Namgyu Kim, Uwe Schindler)
 
-* GITHUB#15867: Use IllegalCallerException to signal wrong caller in internal classes
+* GITHUB#15878: Fix existential quantification bug in caller checks
   (VectorizationProvider, TestSecrets).  (Uwe Schindler)
 
 Other
@@ -105,6 +105,9 @@ Other
 
 * GITHUB#15826: Use ArrayUtil#copyOfSubArray to simplify manual array copy patterns. (Zhang Chao)
 
+* GITHUB#15867: Use IllegalCallerException to signal wrong caller in internal classes
+  (VectorizationProvider, TestSecrets).  (Uwe Schindler)
+
 ======================= Lucene 10.4.0 =======================
 
 API Changes
diff --git a/lucene/core/src/java/org/apache/lucene/internal/tests/TestSecrets.java b/lucene/core/src/java/org/apache/lucene/internal/tests/TestSecrets.java
index 74bb4ee9e54..5afdf10c080 100644
--- a/lucene/core/src/java/org/apache/lucene/internal/tests/TestSecrets.java
+++ b/lucene/core/src/java/org/apache/lucene/internal/tests/TestSecrets.java
@@ -142,7 +142,7 @@ public final class TestSecrets {
                     s.skip(2)
                         .limit(1)
                         .map(StackFrame::getClassName)
-                        .allMatch(allowedCaller.getName()::equals));
+                        .anyMatch(allowedCaller.getName()::equals));
     if (!validCaller || needsNull != null) {
       throw new IllegalCallerException(
           "The accessor can only be set once by " + allowedCaller.getName() + ".");
@@ -157,7 +157,7 @@ public final class TestSecrets {
                     s.skip(2)
                         .limit(1)
                         .map(StackFrame::getClassName)
-                        .allMatch(
+                        .anyMatch(
                             c ->
                                 c.startsWith("org.apache.lucene.tests.")
                                     || c.equals(
diff --git a/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java b/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java
index 236ddd0696f..02ba853608e 100644
--- a/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java
+++ b/lucene/core/src/java/org/apache/lucene/internal/vectorization/VectorizationProvider.java
@@ -229,7 +229,7 @@ public abstract class VectorizationProvider {
                     s.skip(2)
                         .limit(1)
                         .map(StackFrame::getClassName)
-                        .allMatch(VALID_CALLERS::contains));
+                        .anyMatch(VALID_CALLERS::contains));
     if (!validCaller) {
       throw new IllegalCallerException(
           "VectorizationProvider is internal and can only be used by known Lucene classes.");