Apache Solr open-source search software
SOLR-16427: Evaluate and fix errorprone rules - AlmostJavadoc
Kevin Risdenfc18c6bf06d3
diff --git a/gradle/validation/error-prone.gradle b/gradle/validation/error-prone.gradleindex 27ca81117e8..ac5593c7c1a 100644--- a/gradle/validation/error-prone.gradle+++ b/gradle/validation/error-prone.gradle@@ -74,7 +74,6 @@ allprojects { prj ->'-Xep:StaticAssignmentInConstructor:OFF', // we assign SolrTestCaseJ4.configString in many tests, difficult to untangle'-Xep:ComparableType:OFF', // SolrTestCaseJ4.Doc and Fld are messy- '-Xep:AlmostJavadoc:OFF','-Xep:AlreadyChecked:OFF','-Xep:AmbiguousMethodReference:OFF','-Xep:ArgumentSelectionDefectChecker:OFF',diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetParser.java b/solr/core/src/java/org/apache/solr/search/facet/FacetParser.javaindex b92a4e07c41..3c7edfa826c 100644--- a/solr/core/src/java/org/apache/solr/search/facet/FacetParser.java+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetParser.java@@ -532,33 +532,6 @@ abstract class FacetParser<T extends FacetRequest> {}}- /* not a separate type of parser for now...- static class FacetBlockParentParser extends FacetParser<FacetBlockParent> {- public FacetBlockParentParser(FacetParser parent, String key) {- super(parent, key);- facet = new FacetBlockParent();- }-- @Override- public FacetBlockParent parse(Object arg) throws SyntaxError {- parseCommonParams(arg);-- if (arg instanceof String) {- // just the field name...- facet.parents = (String)arg;-- } else if (arg instanceof Map) {- Map<String, Object> m = (Map<String, Object>) arg;- facet.parents = getString(m, "parents", null);-- parseSubs( m.get("facet") );- }-- return facet;- }- }- */-static class FacetFieldParser extends FacetParser<FacetField> {public FacetFieldParser(FacetParser<?> parent, String key) {super(parent, key);diff --git a/solr/core/src/test/org/apache/solr/search/neural/KnnQParserTest.java b/solr/core/src/test/org/apache/solr/search/neural/KnnQParserTest.javaindex ef27333832d..48e8f3b9aa5 100644--- a/solr/core/src/test/org/apache/solr/search/neural/KnnQParserTest.java+++ b/solr/core/src/test/org/apache/solr/search/neural/KnnQParserTest.java@@ -347,9 +347,10 @@ public class KnnQParserTest extends SolrTestCaseJ4 {"//result/doc[4]/str[@name='id'][.='3']");}- /*- * See {@link org.apache.solr.search.ReRankQParserPlugin.ReRankQueryRescorer.combine} for more details.- * */+ /**+ * See {@link org.apache.solr.search.ReRankQParserPlugin.ReRankQueryRescorer#combine(float,+ * boolean, float)}} for more details.+ */@Testpublic void knnQueryAsRerank_shouldAddSimilarityFunctionScore() {String vectorToSearch = "[1.0, 2.0, 3.0, 4.0]";diff --git a/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/RequestContinuesRecorderAuthenticationHandler.java b/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/RequestContinuesRecorderAuthenticationHandler.javaindex eb166a7b58a..7ad3b1a89ba 100644--- a/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/RequestContinuesRecorderAuthenticationHandler.java+++ b/solr/modules/hadoop-auth/src/java/org/apache/solr/security/hadoop/RequestContinuesRecorderAuthenticationHandler.java@@ -25,10 +25,9 @@ import org.apache.hadoop.security.authentication.client.AuthenticationException;import org.apache.hadoop.security.authentication.server.AuthenticationHandler;import org.apache.hadoop.security.authentication.server.AuthenticationToken;-/*- * {@link AuthenticationHandler} that delegates to another {@link AuthenticationHandler}- * and records the response of managementOperation (which indicates whether the request- * should continue or not).+/**+ * {@link AuthenticationHandler} that delegates to another {@link AuthenticationHandler} and records+ * the response of managementOperation (which indicates whether the request should continue or not).*/public class RequestContinuesRecorderAuthenticationHandler implements AuthenticationHandler {// filled in by Plugin/Filterdiff --git a/solr/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQueryTemplate.java b/solr/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQueryTemplate.javaindex 336dc2867ce..b273b862ee4 100644--- a/solr/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQueryTemplate.java+++ b/solr/prometheus-exporter/src/java/org/apache/solr/prometheus/exporter/MetricsQueryTemplate.java@@ -23,21 +23,20 @@ import java.util.regex.Matcher;import java.util.regex.Pattern;public class MetricsQueryTemplate {- /*- A regex with named groups is used to match template references to template + vars using the basic pattern:-- $jq:<TEMPLATE>( <UNIQUE>, <KEYSELECTOR>, <METRIC>, <TYPE> )-- For instance,-- $jq:core(requests_total, endswith(".requestTimes"), count, COUNTER)-- TEMPLATE = core- UNIQUE = requests_total (unique suffix for this metric, results in a metric named "solr_metrics_core_requests_total")- KEYSELECTOR = endswith(".requestTimes") (filter to select the specific key for this metric)- METRIC = count- TYPE = COUNTER- */+ /**+ * A regex with named groups is used to match template references to template + vars using the+ * basic pattern:+ *+ * <p>$jq:<TEMPLATE>( <UNIQUE>, <KEYSELECTOR>, <METRIC>, <TYPE> )+ *+ * <p>For instance,+ *+ * <p>$jq:core(requests_total, endswith(".requestTimes"), count, COUNTER)+ *+ * <p>TEMPLATE = core UNIQUE = requests_total (unique suffix for this metric, results in a metric+ * named "solr_metrics_core_requests_total") KEYSELECTOR = endswith(".requestTimes") (filter to+ * select the specific key for this metric) METRIC = count TYPE = COUNTER+ */private static final Pattern matchJqTemplate =Pattern.compile("^\\$jq:(?<TEMPLATE>.*?)\\(\\s?(?<UNIQUE>[^,]*),\\s?(?<KEYSELECTOR>[^,]*)(,\\s?(?<METRIC>[^,]*)\\s?)?(,\\s?(?<TYPE>[^,]*)\\s?)?\\)$");