diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 61e0a614bae..1e3bfd129c7 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -525,6 +525,8 @@ Other Changes * SOLR-8246: Fix SolrCLI to clean the config directory in case creating a core failed. (Jason Gerlowski via Shai Erera) +* SOLR-8290: remove SchemaField.checkFieldCacheSource's unused QParser argument (Christine Poerschke) + ================== 5.3.1 ================== Bug Fixes diff --git a/solr/core/src/java/org/apache/solr/schema/BoolField.java b/solr/core/src/java/org/apache/solr/schema/BoolField.java index 594507d653a..5971516ebbc 100644 --- a/solr/core/src/java/org/apache/solr/schema/BoolField.java +++ b/solr/core/src/java/org/apache/solr/schema/BoolField.java @@ -62,7 +62,7 @@ public class BoolField extends PrimitiveFieldType { @Override public ValueSource getValueSource(SchemaField field, QParser qparser) { - field.checkFieldCacheSource(qparser); + field.checkFieldCacheSource(); return new BoolFieldSource(field.name); } diff --git a/solr/core/src/java/org/apache/solr/schema/CurrencyField.java b/solr/core/src/java/org/apache/solr/schema/CurrencyField.java index 5a81e262e05..9d58731d1e9 100644 --- a/solr/core/src/java/org/apache/solr/schema/CurrencyField.java +++ b/solr/core/src/java/org/apache/solr/schema/CurrencyField.java @@ -274,7 +274,7 @@ public class CurrencyField extends FieldType implements SchemaAware, ResourceLoa */ public RawCurrencyValueSource getValueSource(SchemaField field, QParser parser) { - field.checkFieldCacheSource(parser); + field.checkFieldCacheSource(); return new RawCurrencyValueSource(field, defaultCurrency, parser); } diff --git a/solr/core/src/java/org/apache/solr/schema/EnumField.java b/solr/core/src/java/org/apache/solr/schema/EnumField.java index 54f0d8b3bad..86d6dec5245 100644 --- a/solr/core/src/java/org/apache/solr/schema/EnumField.java +++ b/solr/core/src/java/org/apache/solr/schema/EnumField.java @@ -203,7 +203,7 @@ public class EnumField extends PrimitiveFieldType { */ @Override public ValueSource getValueSource(SchemaField field, QParser qparser) { - field.checkFieldCacheSource(qparser); + field.checkFieldCacheSource(); return new EnumFieldSource(field.getName(), enumIntToStringMap, enumStringToIntMap); } diff --git a/solr/core/src/java/org/apache/solr/schema/FieldType.java b/solr/core/src/java/org/apache/solr/schema/FieldType.java index 7882cad0b74..c3da33b09ee 100644 --- a/solr/core/src/java/org/apache/solr/schema/FieldType.java +++ b/solr/core/src/java/org/apache/solr/schema/FieldType.java @@ -669,7 +669,7 @@ public abstract class FieldType extends FieldProperties { * Lucene FieldCache.) */ public ValueSource getValueSource(SchemaField field, QParser parser) { - field.checkFieldCacheSource(parser); + field.checkFieldCacheSource(); return new StrFieldSource(field.name); } diff --git a/solr/core/src/java/org/apache/solr/schema/GeoHashField.java b/solr/core/src/java/org/apache/solr/schema/GeoHashField.java index db48a80c7a2..ec1772f7755 100644 --- a/solr/core/src/java/org/apache/solr/schema/GeoHashField.java +++ b/solr/core/src/java/org/apache/solr/schema/GeoHashField.java @@ -89,7 +89,7 @@ public class GeoHashField extends FieldType implements SpatialQueryable { @Override public ValueSource getValueSource(SchemaField field, QParser parser) { - field.checkFieldCacheSource(parser); + field.checkFieldCacheSource(); return new StrFieldSource(field.name); } diff --git a/solr/core/src/java/org/apache/solr/schema/SchemaField.java b/solr/core/src/java/org/apache/solr/schema/SchemaField.java index 45a333e9834..27a642c7758 100644 --- a/solr/core/src/java/org/apache/solr/schema/SchemaField.java +++ b/solr/core/src/java/org/apache/solr/schema/SchemaField.java @@ -28,7 +28,6 @@ import org.apache.lucene.search.SortField; import org.apache.solr.common.SolrException; import org.apache.solr.common.util.SimpleOrderedMap; import org.apache.solr.response.TextResponseWriter; -import org.apache.solr.search.QParser; /** * Encapsulates all information about a Field in a Solr Schema @@ -177,7 +176,7 @@ public final class SchemaField extends FieldProperties { * getValueSource implementation * @see FieldType#getValueSource */ - public void checkFieldCacheSource(QParser parser) throws SolrException { + public void checkFieldCacheSource() throws SolrException { if (! (indexed() || hasDocValues()) ) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "can not use FieldCache on a field which is neither indexed nor has doc values: " diff --git a/solr/core/src/java/org/apache/solr/schema/StrField.java b/solr/core/src/java/org/apache/solr/schema/StrField.java index 7e6a91333b1..f31d79ad4a8 100644 --- a/solr/core/src/java/org/apache/solr/schema/StrField.java +++ b/solr/core/src/java/org/apache/solr/schema/StrField.java @@ -79,7 +79,7 @@ public class StrField extends PrimitiveFieldType { @Override public ValueSource getValueSource(SchemaField field, QParser parser) { - field.checkFieldCacheSource(parser); + field.checkFieldCacheSource(); return new StrFieldSource(field.getName()); } diff --git a/solr/core/src/java/org/apache/solr/schema/TrieField.java b/solr/core/src/java/org/apache/solr/schema/TrieField.java index c0a5ca1adea..134f0fb9f69 100644 --- a/solr/core/src/java/org/apache/solr/schema/TrieField.java +++ b/solr/core/src/java/org/apache/solr/schema/TrieField.java @@ -228,7 +228,7 @@ public class TrieField extends PrimitiveFieldType { @Override public ValueSource getValueSource(SchemaField field, QParser qparser) { - field.checkFieldCacheSource(qparser); + field.checkFieldCacheSource(); switch (type) { case INTEGER: return new IntFieldSource( field.getName());