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

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


The following commit(s) were added to refs/heads/branch_9x by this push:
     new a3f0d80eb01 Reviewing streaming code and making small clean ups. 
(#2558)
a3f0d80eb01 is described below

commit a3f0d80eb0129d9326507943e7517db158b02bce
Author: Eric Pugh <[email protected]>
AuthorDate: Thu Aug 22 08:13:11 2024 -0500

    Reviewing streaming code and making small clean ups. (#2558)
    
    Typos, methods not used, return values not used, that sort of thing. 
Primarily driven by IntelliJ warnings.
    
    ---------
    
    Co-authored-by: Christine Poerschke <[email protected]>
    (cherry picked from commit 47d5547238150b1e0814c42c2d505a7f33825001)
---
 .../solr/client/solrj/io/comp/FieldComparator.java       |  2 +-
 .../apache/solr/client/solrj/io/eval/AscEvaluator.java   |  2 +-
 .../solrj/io/stream/eval/CoalesceEvaluatorTest.java      |  2 +-
 .../solrj/io/stream/eval/ConversionEvaluatorsTest.java   |  2 +-
 .../client/solrj/io/stream/eval/DivideEvaluatorTest.java |  2 +-
 .../solrj/io/stream/eval/FieldValueEvaluatorTest.java    |  2 --
 .../client/solrj/io/stream/eval/ModuloEvaluatorTest.java |  2 +-
 .../solrj/io/stream/eval/MultiplyEvaluatorTest.java      |  2 +-
 .../client/solrj/io/stream/eval/PowerEvaluatorTest.java  |  2 +-
 .../solrj/io/stream/eval/SubtractEvaluatorTest.java      |  2 +-
 .../solrj/io/stream/eval/TemporalEvaluatorsTest.java     | 12 ++++++------
 .../solrj/io/stream/expr/StreamExpressionParserTest.java |  2 +-
 .../client/solrj/io/stream/ops/ConcatOperationTest.java  | 16 ++++++++--------
 13 files changed, 24 insertions(+), 26 deletions(-)

diff --git 
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/comp/FieldComparator.java
 
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/comp/FieldComparator.java
index e47bfd90da8..37049baaad4 100644
--- 
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/comp/FieldComparator.java
+++ 
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/comp/FieldComparator.java
@@ -97,7 +97,7 @@ public class FieldComparator implements StreamComparator {
   }
 
   /*
-   * What're we doing here messing around with lambdas for the comparator 
logic?
+   * What are we doing here messing around with lambdas for the comparator 
logic?
    * We want the compare(...) function to run as fast as possible because it 
will be called many many
    * times over the lifetime of this object. For that reason we want to limit 
the number of comparisons
    * taking place in the compare(...) function. Because this class supports 
both ascending and
diff --git 
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/AscEvaluator.java
 
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/AscEvaluator.java
index abcb9752372..015dafeb879 100644
--- 
a/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/AscEvaluator.java
+++ 
b/solr/solrj-streaming/src/java/org/apache/solr/client/solrj/io/eval/AscEvaluator.java
@@ -75,7 +75,7 @@ public class AscEvaluator extends RecursiveObjectEvaluator 
implements OneValueWo
         throw new IOException(
             String.format(
                 Locale.ROOT,
-                "Invalid expression %s - value %s is of type %s but we are 
expeting type %s",
+                "Invalid expression %s - value %s is of type %s but we are 
expecting type %s",
                 toExpression(constructingFactory),
                 item.toString(),
                 item.getClass().getSimpleName(),
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java
index b6e9fe36354..0b5053b7a20 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/CoalesceEvaluatorTest.java
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
- * this work for multitional information regarding copyright ownership.
+ * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java
index 60f42b7d155..614cab5ad73 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ConversionEvaluatorsTest.java
@@ -47,7 +47,7 @@ public class ConversionEvaluatorsTest extends SolrTestCase {
   }
 
   @Test
-  public void testInvalidExpression() throws Exception {
+  public void testInvalidExpression() {
 
     StreamEvaluator evaluator;
 
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java
index 935175f144a..73b521cf413 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/DivideEvaluatorTest.java
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
- * this work for multitional information regarding copyright ownership.
+ * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java
index 413049268d7..e2b3f2e11d2 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/FieldValueEvaluatorTest.java
@@ -36,7 +36,6 @@ public class FieldValueEvaluatorTest extends SolrTestCase {
     values = new HashMap<>();
   }
 
-  @SuppressWarnings("serial")
   @Test
   public void listTypes() throws Exception {
     values.clear();
@@ -87,7 +86,6 @@ public class FieldValueEvaluatorTest extends SolrTestCase {
         "second", ((Collection<?>) new 
FieldValueEvaluator("e").evaluate(tuple)).toArray()[1]);
   }
 
-  @SuppressWarnings("serial")
   @Test
   public void iterableTypes() throws Exception {
     values.clear();
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java
index d61be7821a8..7a9319b5634 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/ModuloEvaluatorTest.java
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
- * this work for multitional information regarding copyright ownership.
+ * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java
index b363ab4cc0c..a2f368d6d81 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/MultiplyEvaluatorTest.java
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
- * this work for multitional information regarding copyright ownership.
+ * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java
index 817b04c86f9..287bc939e50 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/PowerEvaluatorTest.java
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
- * this work for multitional information regarding copyright ownership.
+ * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java
index 0ca2eeaf3cb..91063467ee1 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/SubtractEvaluatorTest.java
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
- * this work for subitional information regarding copyright ownership.
+ * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/TemporalEvaluatorsTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/TemporalEvaluatorsTest.java
index ade96428b16..2701f55cd66 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/TemporalEvaluatorsTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/eval/TemporalEvaluatorsTest.java
@@ -81,7 +81,7 @@ public class TemporalEvaluatorsTest extends SolrTestCase {
   }
 
   @Test
-  public void testInvalidExpression() throws Exception {
+  public void testInvalidExpression() {
 
     StreamEvaluator evaluator;
 
@@ -175,7 +175,7 @@ public class TemporalEvaluatorsTest extends SolrTestCase {
     testFunction("quarter(a)", "1995-12-31T23:59:59Z", 4L);
     testFunction("week(a)", "1995-12-31T23:59:59Z", 52L);
     testFunction("second(a)", "1995-12-31T23:59:58Z", 58L);
-    testFunction("epoch(a)", "1995-12-31T23:59:59Z", 820454399000l);
+    testFunction("epoch(a)", "1995-12-31T23:59:59Z", 820454399000L);
 
     testFunction("year(a)", "2017-03-17T10:30:45Z", 2017L);
     testFunction("year('a')", "2017-03-17T10:30:45Z", 2017L);
@@ -189,10 +189,10 @@ public class TemporalEvaluatorsTest extends SolrTestCase {
     testFunction("quarter(a)", "2017-03-17T10:30:45Z", 1L);
     testFunction("week(a)", "2017-03-17T10:30:45Z", 11L);
     testFunction("second(a)", "2017-03-17T10:30:45Z", 45L);
-    testFunction("epoch(a)", "2017-03-17T10:30:45Z", 1489746645000l);
+    testFunction("epoch(a)", "2017-03-17T10:30:45Z", 1489746645000L);
 
-    testFunction("epoch(a)", new Date(1489746645500l).toInstant().toString(), 
1489746645500l);
-    testFunction("epoch(a)", new Date(820454399990l).toInstant().toString(), 
820454399990l);
+    testFunction("epoch(a)", new Date(1489746645500L).toInstant().toString(), 
1489746645500L);
+    testFunction("epoch(a)", new Date(820454399990L).toInstant().toString(), 
820454399990L);
   }
 
   @Test
@@ -238,7 +238,7 @@ public class TemporalEvaluatorsTest extends SolrTestCase {
   @Test
   public void testFunctionsOnLong() throws Exception {
 
-    Long longDate = 1512518340000l;
+    Long longDate = 1512518340000L;
 
     testFunction("year(a)", longDate, 2017);
     testFunction("month(a)", longDate, 12);
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java
index 915a64f030e..36f6bc348bd 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/expr/StreamExpressionParserTest.java
@@ -27,7 +27,7 @@ public class StreamExpressionParserTest extends SolrTestCase {
   }
 
   @Test
-  public void testParsing() throws Exception {
+  public void testParsing() {
     StreamExpression actual, expected;
 
     actual = StreamExpressionParser.parse("aliases(a_i=alias.a_i)");
diff --git 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java
 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java
index 029176c75fb..3a1e0326c6f 100644
--- 
a/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java
+++ 
b/solr/solrj-streaming/src/test/org/apache/solr/client/solrj/io/stream/ops/ConcatOperationTest.java
@@ -40,7 +40,7 @@ public class ConcatOperationTest extends SolrTestCase {
   }
 
   @Test
-  public void concatSingleField() throws Exception {
+  public void concatSingleField() {
     Tuple tuple;
     StreamOperation operation;
 
@@ -59,7 +59,7 @@ public class ConcatOperationTest extends SolrTestCase {
   }
 
   @Test
-  public void concatMultipleFields() throws Exception {
+  public void concatMultipleFields() {
     Tuple tuple;
     StreamOperation operation;
 
@@ -79,7 +79,7 @@ public class ConcatOperationTest extends SolrTestCase {
     assertNotNull(tuple.get("fieldABConcat"));
     assertEquals("bar-baz", tuple.get("fieldABConcat"));
 
-    // do the same in oposite order
+    // do the same in reverse order
     operation = new ConcatOperation(new String[] {"fieldB", "fieldA"}, 
"fieldABConcat", "-");
     tuple = new Tuple(values);
     operation.operate(tuple);
@@ -95,7 +95,7 @@ public class ConcatOperationTest extends SolrTestCase {
   }
 
   @Test
-  public void concatMultipleFieldsWithIgnoredFields() throws Exception {
+  public void concatMultipleFieldsWithIgnoredFields() {
     Tuple tuple;
     StreamOperation operation;
 
@@ -123,7 +123,7 @@ public class ConcatOperationTest extends SolrTestCase {
     assertNotNull(tuple.get("fieldABConcat"));
     assertEquals("bar-baz", tuple.get("fieldABConcat"));
 
-    // do the same in oposite order
+    // do the same in opposite order
     operation = new ConcatOperation(new String[] {"fieldB", "fieldA"}, 
"fieldABConcat", "-");
     tuple = new Tuple(values);
     operation.operate(tuple);
@@ -139,7 +139,7 @@ public class ConcatOperationTest extends SolrTestCase {
   }
 
   @Test
-  public void concatWithNullValues() throws Exception {
+  public void concatWithNullValues() {
     Tuple tuple;
     StreamOperation operation;
 
@@ -207,7 +207,7 @@ public class ConcatOperationTest extends SolrTestCase {
     assertNotNull(tuple.get("fieldABConcat"));
     assertEquals("bar-baz", tuple.get("fieldABConcat"));
 
-    // do the same in oposite order
+    // do the same in opposite order
     operation =
         new ConcatOperation(
             StreamExpressionParser.parse(
@@ -259,7 +259,7 @@ public class ConcatOperationTest extends SolrTestCase {
     assertNotNull(tuple.get("fieldABConcat"));
     assertEquals("bar-baz", tuple.get("fieldABConcat"));
 
-    // do the same in oposite order
+    // do the same in opposite order
     operation =
         new ConcatOperation(
             StreamExpressionParser.parse(

Reply via email to