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:18:34 UTC
(lucene) branch main 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 main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new bff8a8f1d43 Fix existential quantification bug in caller checks (#15878)
bff8a8f1d43 is described below
commit bff8a8f1d4360f6c2a041bcf502d96c399a8b4aa
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 12e244149e4..b8c121d2730 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -291,7 +291,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
@@ -311,6 +311,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 12bf56c89d6..f77c1638fec 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
@@ -222,7 +222,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.");