You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by co...@apache.org on 2023/09/01 08:48:32 UTC

[solr] branch main updated: Revert "SOLR-16958: Fix spurious warning about LATEST luceneMatchVersion"

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

colvinco pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 9d6db8c900d Revert "SOLR-16958: Fix spurious warning about LATEST luceneMatchVersion"
9d6db8c900d is described below

commit 9d6db8c900dca52c469e5f94ddb8e4d7fa349c03
Author: Colvin Cowie <co...@gmail.com>
AuthorDate: Fri Sep 1 09:47:23 2023 +0100

    Revert "SOLR-16958: Fix spurious warning about LATEST luceneMatchVersion"
---
 solr/CHANGES.txt                                        | 2 --
 solr/core/src/java/org/apache/solr/core/SolrConfig.java | 4 +---
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 9bfc1191052..e7e31b686d5 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -151,8 +151,6 @@ Bug Fixes
 * SOLR-16916: Use of the JSON Query DSL should ignore the defType parameter
   (Christina Chortaria, Max Kadel, Ryan Laddusaw, Jane Sandberg, David Smiley)
 
-* SOLR-16958: Fix spurious warning about LATEST luceneMatchVersion (Colvin Cowie)
-
 Dependency Upgrades
 ---------------------
 
diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
index cb750ebe132..563d817803e 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
@@ -420,9 +420,7 @@ public class SolrConfig implements MapSerializable {
           pe);
     }
 
-    // The use of == is intentional here because the latest 'V.V.V' version will be equal() to
-    // Version.LATEST, but will not be == to Version.LATEST unless 'LATEST' was supplied.
-    if (version == Version.LATEST && !versionWarningAlreadyLogged.getAndSet(true)) {
+    if (Objects.equals(version, Version.LATEST) && !versionWarningAlreadyLogged.getAndSet(true)) {
       log.warn(
           "You should not use LATEST as luceneMatchVersion property: "
               + "if you use this setting, and then Solr upgrades to a newer release of Lucene, "