From 4aae1517fa733718960a78a8ab29583d4c6e1c67 Mon Sep 17 00:00:00 2001 From: David Smiley Date: Sat, 11 Jan 2025 15:34:17 -0500 Subject: [PATCH] tidy --- .../java/org/apache/solr/request/SimpleFacets.java | 2 +- .../apache/solr/common/util/SimpleOrderedMap.java | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java index 03b09a5b180..b5ea0b66eb6 100644 --- a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java +++ b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java @@ -876,7 +876,7 @@ public SimpleOrderedMap getFacetFieldCounts() throws IOException, Syntax String[] facetFs = global.getParams(FacetParams.FACET_FIELD); if (null == facetFs) { - return SimpleOrderedMap.of(); + return SimpleOrderedMap.of(); } // Passing a negative number for FACET_THREADS implies an unlimited number of threads is diff --git a/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java b/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java index cd4eb3951fd..20178a252e3 100644 --- a/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java +++ b/solr/solrj/src/java/org/apache/solr/common/util/SimpleOrderedMap.java @@ -34,8 +34,9 @@ * serialized. It aims to minimize overhead and to be efficient at adding new elements. */ public class SimpleOrderedMap extends NamedList { - + private static final SimpleOrderedMap EMPTY = new SimpleOrderedMap<>(List.of()); + /** Creates an empty instance */ public SimpleOrderedMap() { super(); @@ -72,7 +73,8 @@ public SimpleOrderedMap clone() { /** * Returns a shared, empty, and immutable instance of SimpleOrderedMap. - * @return Empty SimpleOrderedMap (immutable) + * + * @return Empty SimpleOrderedMap (immutable) */ public static SimpleOrderedMap of() { return EMPTY; @@ -80,12 +82,10 @@ public static SimpleOrderedMap of() { /** * Returns an immutable instance of SimpleOrderedMap with a single key-value pair. + * * @return SimpleOrderedMap containing one key-value pair */ - - public static SimpleOrderedMap of(String name, T val) - { - return new SimpleOrderedMap<>(List.of(name, val)); + public static SimpleOrderedMap of(String name, T val) { + return new SimpleOrderedMap<>(List.of(name, val)); } - }