You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/02/24 22:36:01 UTC

[GitHub] [solr] risdenk opened a new pull request #706: SOLR-14920: Spotless formatting for solrj

risdenk opened a new pull request #706:
URL: https://github.com/apache/solr/pull/706


   https://issues.apache.org/jira/browse/SOLR-14920


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on a change in pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #706:
URL: https://github.com/apache/solr/pull/706#discussion_r815928810



##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientTest.java
##########
@@ -16,33 +16,36 @@
  */
 package org.apache.solr.client.solrj.impl;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.solr.client.solrj.ResponseParser;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.junit.Test;
 
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-/**
- * Test the LBHttpSolrClient.
- */
+/** Test the LBHttpSolrClient. */
 public class LBHttpSolrClientTest {
-  
+
   /**
    * Test method for {@link LBHttpSolrClient.Builder}.
-   * 
-   * Validate that the parser passed in is used in the <code>HttpSolrClient</code> instances created.
+   *
+   * <p>Validate that the parser passed in is used in the <code>HttpSolrClient</code> instances
+   * created.
    */
   @Test
-  // commented out on: 17-Feb-2019   @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 17-Feb-2019
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added

Review comment:
       I've tried to remove all the ones I came across (since they were 2-3 years old at this point). `./src/test/org/apache/solr/client/solrj/io/stream` is specifically excluded in this PR - so not surprised they are there.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on pull request #706:
URL: https://github.com/apache/solr/pull/706#issuecomment-1054319979


   Thanks @ErickErickson  really appreciate it! - Fixed in eec4ea82f595a2cf78b6380e9900677b34bcea19


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on pull request #706:
URL: https://github.com/apache/solr/pull/706#issuecomment-1051073273


   Thanks @dsmiley. I can 100% guarantee I didn't get everything, but tried my best to find at least all the "obvious" things. I encourage anyone who wants to at least poke through a few files they might care about.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk merged pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk merged pull request #706:
URL: https://github.com/apache/solr/pull/706


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on a change in pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #706:
URL: https://github.com/apache/solr/pull/706#discussion_r814800562



##########
File path: solr/solrj/src/java/org/apache/solr/common/util/FastOutputStream.java
##########
@@ -93,38 +92,35 @@ public void write(byte arr[], int off, int len) throws IOException {
       // write whatever we can fit, then flush and iterate.
 
       System.arraycopy(arr, off, buf, pos, space);
-      written += buf.length;  // important to do this first, since buf.length can change after a flush!
+      written +=
+          buf.length; // important to do this first, since buf.length can change after a flush!

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -136,16 +121,18 @@ public static String getEventString(int e) {
 
   protected int flags = FLAGS_DEFAULT;
 
-  protected final char[] buf;  // input buffer with JSON text in it
-  protected int start;         // current position in the buffer
-  protected int end;           // end position in the buffer (one past last valid index)
-  protected final Reader in;   // optional reader to obtain data from
+  protected final char[] buf; // input buffer with JSON text in it
+  protected int start; // current position in the buffer
+  protected int end; // end position in the buffer (one past last valid index)
+  protected final Reader in; // optional reader to obtain data from
   protected boolean eof = false; // true if the end of the stream was reached.
-  protected long gpos;          // global position = gpos + start
+  protected long gpos; // global position = gpos + start
 
-  protected int event;         // last event read
+  protected int event; // last event read
 
-  protected int stringTerm;    // The terminator for the last string we read: single quote, double quote, or 0 for unterminated.
+  protected int
+      stringTerm; // The terminator for the last string we read: single quote, double quote, or 0
+  // for unterminated.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
##########
@@ -269,7 +267,8 @@ public void writeVal(Object val) throws IOException {
       }
     }
     // Fallback to do *something*.
-    // note: if the user of this codec doesn't want this (e.g. UpdateLog) it can supply an ObjectResolver that does
+    // note: if the user of this codec doesn't want this (e.g. UpdateLog) it can supply an
+    // ObjectResolver that does
     //  something else like throw an exception.

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/TestSolrJErrorHandling.java
##########
@@ -256,15 +259,19 @@ String getResponse(InputStream is) throws Exception {
       if (n <= 0) break;
       sb.append(new String(buf, 0, n, StandardCharsets.UTF_8));
       log.info("BUFFER={}", sb);
-      break;  // for now, assume we got whole response in one read... otherwise we could block when trying to read again
+      break; // for now, assume we got whole response in one read... otherwise we could block when
+      // trying to read again
     }
     return sb.toString();
   }
 
   @Test
   public void testHttpURLConnection() throws Exception {
 
-   String bodyString = getJsonDocs(200000);  // sometimes succeeds with this size, but larger can cause OOM from command line
+    String bodyString =
+        getJsonDocs(
+            200000); // sometimes succeeds with this size, but larger can cause OOM from command
+    // line

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
##########
@@ -16,35 +16,34 @@
  */
 package org.apache.solr.client.solrj.beans;
 
+import java.io.StringReader;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 import org.apache.solr.SolrTestCase;
 import org.apache.solr.client.solrj.impl.XMLResponseParser;
 import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.SolrInputField;
-import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.util.NamedList;
 import org.junit.Test;
 
-import java.io.StringReader;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
-
 public class TestDocumentObjectBinder extends SolrTestCase {
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -258,87 +245,90 @@ protected int getChar() throws IOException {
   }
 
   /**
-   * Returns true if the given character is considered to be whitespace.
-   * One difference between Java's Character.isWhitespace() is that this method
-   * considers a hard space (non-breaking space, or nbsp) to be whitespace.
+   * Returns true if the given character is considered to be whitespace. One difference between
+   * Java's Character.isWhitespace() is that this method considers a hard space (non-breaking space,
+   * or nbsp) to be whitespace.
    */
   protected static final boolean isWhitespace(int ch) {
     return (Character.isWhitespace(ch) || ch == 0x00a0);
   }
 
-  private static final long WS_MASK = (1L << ' ') | (1L << '\t') | (1L << '\r') | (1L << '\n') | (1L << '#') | (1L << '/') | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
+  private static final long WS_MASK =
+      (1L << ' ')
+          | (1L << '\t')
+          | (1L << '\r')
+          | (1L << '\n')
+          | (1L << '#')
+          | (1L << '/')
+          | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
 
   protected int getCharNWS() throws IOException {
     for (; ; ) {
       int ch = getChar();
       // getCharNWS is normally called in the context of expecting certain JSON special characters
       // such as ":}"],"
-      // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-      // even w/o checking the range first.  We'll only get some false-positives while using bare strings (chars "IJMc")
+      // all of these characters are below 64 (including comment chars '/' and '#', so we can make
+      // this the fast path
+      // even w/o checking the range first.  We'll only get some false-positives while using bare
+      // strings (chars "IJMc")

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientMultiConstructorTest.java
##########
@@ -70,13 +70,16 @@ public void testZkConnectionStringConstructorWithValidChroot() throws IOExceptio
       clientChroot = "/mychroot";
     }
 
-    try (CloudHttp2SolrClient client = new CloudHttp2SolrClient.Builder(new ArrayList<>(hosts), Optional.ofNullable(clientChroot)).build()) {
+    try (CloudHttp2SolrClient client =
+        new CloudHttp2SolrClient.Builder(new ArrayList<>(hosts), Optional.ofNullable(clientChroot))
+            .build()) {
       assertEquals(sb.toString(), client.getZkHost());
     }
   }
-  
+
   @Test(expected = IllegalArgumentException.class)
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java
##########
@@ -33,67 +32,74 @@
   private static final String ANY_OTHER_ZK_HOST = "ANY_OTHER_ZK_HOST";
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/util/Utils.java
##########
@@ -891,19 +918,20 @@ public static void reflectWrite(MapWriter.EntryWriter ew, Object o) throws IOExc
     for (FieldWriter fieldWriter : fieldWriters) {
       try {
         fieldWriter.write(ew, o);
-      } catch( Throwable e) {
+      } catch (Throwable e) {
         throw new RuntimeException(e);
-        //should not happen
+        // should not happen
       }
     }
   }
 
   private static List<FieldWriter> getReflectData(Class<?> c) throws IllegalAccessException {
     boolean sameClassLoader = c.getClassLoader() == Utils.class.getClassLoader();
-    //we should not cache the class references of objects loaded from packages because they will not get garbage collected
-    //TODO fix that later
-    List<FieldWriter> reflectData = sameClassLoader ? storedReflectData.get(c): null;
-    if(reflectData == null) {
+    // we should not cache the class references of objects loaded from packages because they will
+    // not get garbage collected
+    // TODO fix that later

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java
##########
@@ -33,67 +32,74 @@
   private static final String ANY_OTHER_ZK_HOST = "ANY_OTHER_ZK_HOST";
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSingleZkHostSpecified() throws IOException {
-    try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT))
-        .build()) {
+    try (CloudSolrClient createdClient =
+        new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
##########
@@ -37,7 +36,8 @@
   Collection<String> hosts;
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
##########
@@ -400,17 +415,20 @@ public void testRouting() throws Exception {
     }
 
     assertEquals("Unexpected number of requests to expected URLs", n, increaseFromExpectedUrls);
-    assertEquals("Unexpected number of requests to unexpected URLs: " + numRequestsToUnexpectedUrls,
-        0, increaseFromUnexpectedUrls);
-
+    assertEquals(
+        "Unexpected number of requests to unexpected URLs: " + numRequestsToUnexpectedUrls,
+        0,
+        increaseFromUnexpectedUrls);
   }
 
   /**
    * Tests if the specification of 'shards.preference=replica.location:local' in the query-params
    * limits the distributed query to locally hosted shards only
    */
   @Test
-  // commented 4-Sep-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
+  // commented 4-Sep-2018
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+  // 2-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
##########
@@ -70,14 +70,16 @@ public void testZkConnectionStringSetterWithValidChroot() throws IOException {
       clientChroot = "/mychroot";
     }
 
-    try (CloudSolrClient client = (new CloudSolrClient.Builder(new ArrayList<>(hosts),
-        Optional.ofNullable(clientChroot)).build())) {
+    try (CloudSolrClient client =
+        (new CloudSolrClient.Builder(new ArrayList<>(hosts), Optional.ofNullable(clientChroot))
+            .build())) {
       assertEquals(sb.toString(), client.getZkHost());
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientBuilderTest.java
##########
@@ -40,28 +37,34 @@ public void testRejectsMissingBaseSolrUrl() {
   @Test
   @SuppressWarnings({"try"})
   public void testMissingQueueSize() {
-    try (ConcurrentUpdateSolrClient client = new Builder("someurl").build()){
-      // Do nothing as we just need to test that the only mandatory parameter for building the client
+    try (ConcurrentUpdateSolrClient client = new Builder("someurl").build()) {
+      // Do nothing as we just need to test that the only mandatory parameter for building the
+      // client
       // is the baseSolrUrl

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
##########
@@ -1775,41 +2353,52 @@ public void testUpdateField() throws Exception {
     client.add(doc);
     client.commit();
     SolrQuery q = new SolrQuery("*:*");
-    q.setFields("id", field,"name", "_version_");
+    q.setFields("id", field, "name", "_version_");
     QueryResponse resp = client.query(q);
     assertEquals("Doc count does not match", 1, resp.getResults().getNumFound());
-    Long version = (Long)resp.getResults().get(0).getFirstValue("_version_");
+    Long version = (Long) resp.getResults().get(0).getFirstValue("_version_");
     assertNotNull("no version returned", version);
     assertEquals(1.0f, resp.getResults().get(0).getFirstValue(field));
 
-    //update "price" with incorrect version (optimistic locking)
-    HashMap<String, Object> oper = new HashMap<>();  //need better api for this???
-    oper.put("set",100);
+    // update "price" with incorrect version (optimistic locking)
+    HashMap<String, Object> oper = new HashMap<>(); // need better api for this???
+    oper.put("set", 100);
 
     doc = new SolrInputDocument();
     doc.addField("id", "unique");
-    doc.addField("_version_", version+1);
+    doc.addField("_version_", version + 1);
     doc.addField(field, oper);
     try {
       client.add(doc);
-      if(client instanceof HttpSolrClient) { //XXX concurrent client reports exceptions differently
+      if (client
+          instanceof HttpSolrClient) { // XXX concurrent client reports exceptions differently

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/util/JavaBinCodec.java
##########
@@ -358,7 +357,8 @@ public boolean writeKnownType(Object val) throws IOException {
       writeNamedList((NamedList<?>) val);
       return true;
     }
-    if (val instanceof SolrDocumentList) { // SolrDocumentList is a List, so must come before List check
+    if (val
+        instanceof SolrDocumentList) { // SolrDocumentList is a List, so must come before List check

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphExpressionTest.java
##########
@@ -75,23 +72,31 @@
   @BeforeClass
   public static void setupCluster() throws Exception {
     configureCluster(2)
-        .addConfig("conf", getFile("solrj").toPath().resolve("solr").resolve("configsets").resolve("streaming").resolve("conf"))
+        .addConfig(
+            "conf",
+            getFile("solrj")
+                .toPath()
+                .resolve("solr")
+                .resolve("configsets")
+                .resolve("streaming")
+                .resolve("conf"))
         .configure();
 
-    CollectionAdminRequest.createCollection(COLLECTION, "conf", 2, 1).process(cluster.getSolrClient());
-    AbstractDistribZkTestBase.waitForRecoveriesToFinish(COLLECTION, cluster.getSolrClient().getZkStateReader(),
-        false, true, TIMEOUT);
+    CollectionAdminRequest.createCollection(COLLECTION, "conf", 2, 1)
+        .process(cluster.getSolrClient());
+    AbstractDistribZkTestBase.waitForRecoveriesToFinish(
+        COLLECTION, cluster.getSolrClient().getZkStateReader(), false, true, TIMEOUT);
   }
 
   @Before
   public void cleanIndex() throws Exception {
-    new UpdateRequest()
-        .deleteByQuery("*:*")
-        .commit(cluster.getSolrClient(), COLLECTION);
+    new UpdateRequest().deleteByQuery("*:*").commit(cluster.getSolrClient(), COLLECTION);
   }
 
   @Test
-  // commented 4-Sep-2018  @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
+  // commented 4-Sep-2018
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+  // 2-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/JDBCStreamTest.java
##########
@@ -79,34 +83,43 @@ public static void setupCluster() throws Exception {
     CollectionAdminRequest.createCollection(collection, "conf", 2, 1)
         .setPerReplicaState(SolrCloudTestCase.USE_PER_REPLICA_STATE)
         .process(cluster.getSolrClient());
-    AbstractDistribZkTestBase.waitForRecoveriesToFinish(collection, cluster.getSolrClient().getZkStateReader(),
-        false, true, TIMEOUT);
+    AbstractDistribZkTestBase.waitForRecoveriesToFinish(
+        collection, cluster.getSolrClient().getZkStateReader(), false, true, TIMEOUT);
     if (useAlias) {
-      CollectionAdminRequest.createAlias(COLLECTIONORALIAS, collection).process(cluster.getSolrClient());
+      CollectionAdminRequest.createAlias(COLLECTIONORALIAS, collection)
+          .process(cluster.getSolrClient());
     }
   }
 
   @BeforeClass
   public static void setupDatabase() throws Exception {
-    
+
     // Initialize Database
-    // Ok, so.....hsqldb is doing something totally weird so I thought I'd take a moment to explain it.
-    // According to http://www.hsqldb.org/doc/1.8/guide/guide.html#N101EF, section "Components of SQL Expressions", clause "name",
-    // "When an SQL statement is issued, any lowercase characters in unquoted identifiers are converted to uppercase."
+    // Ok, so.....hsqldb is doing something totally weird so I thought I'd take a moment to explain
+    // it.
+    // According to http://www.hsqldb.org/doc/1.8/guide/guide.html#N101EF, section "Components of
+    // SQL Expressions", clause "name",
+    // "When an SQL statement is issued, any lowercase characters in unquoted identifiers are
+    // converted to uppercase."
     // :(   Like seriously....
-    // So, for this reason and to simplify writing these tests I've decided that in all statements all table and column names 
-    // will be in UPPERCASE. This is to ensure things look and behave consistently. Note that this is not a requirement of the 
+    // So, for this reason and to simplify writing these tests I've decided that in all statements
+    // all table and column names
+    // will be in UPPERCASE. This is to ensure things look and behave consistently. Note that this
+    // is not a requirement of the
     // JDBCStream and is only a carryover from the driver we are testing with.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -258,87 +245,90 @@ protected int getChar() throws IOException {
   }
 
   /**
-   * Returns true if the given character is considered to be whitespace.
-   * One difference between Java's Character.isWhitespace() is that this method
-   * considers a hard space (non-breaking space, or nbsp) to be whitespace.
+   * Returns true if the given character is considered to be whitespace. One difference between
+   * Java's Character.isWhitespace() is that this method considers a hard space (non-breaking space,
+   * or nbsp) to be whitespace.
    */
   protected static final boolean isWhitespace(int ch) {
     return (Character.isWhitespace(ch) || ch == 0x00a0);
   }
 
-  private static final long WS_MASK = (1L << ' ') | (1L << '\t') | (1L << '\r') | (1L << '\n') | (1L << '#') | (1L << '/') | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
+  private static final long WS_MASK =
+      (1L << ' ')
+          | (1L << '\t')
+          | (1L << '\r')
+          | (1L << '\n')
+          | (1L << '#')
+          | (1L << '/')
+          | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
 
   protected int getCharNWS() throws IOException {
     for (; ; ) {
       int ch = getChar();
       // getCharNWS is normally called in the context of expecting certain JSON special characters
       // such as ":}"],"
-      // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-      // even w/o checking the range first.  We'll only get some false-positives while using bare strings (chars "IJMc")
+      // all of these characters are below 64 (including comment chars '/' and '#', so we can make
+      // this the fast path
+      // even w/o checking the range first.  We'll only get some false-positives while using bare
+      // strings (chars "IJMc")
       if (((WS_MASK >> ch) & 0x01) == 0) {
         return ch;
-      } else if (ch <= ' ') {   // this will only be true if one of the whitespace bits was set
+      } else if (ch <= ' ') { // this will only be true if one of the whitespace bits was set
         continue;
       } else if (ch == '/') {
         getSlashComment();
       } else if (ch == '#') {
         getNewlineComment();
-      } else if (!isWhitespace(ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace like 0xa0
+      } else if (!isWhitespace(
+          ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace
+        // like 0xa0

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -258,87 +245,90 @@ protected int getChar() throws IOException {
   }
 
   /**
-   * Returns true if the given character is considered to be whitespace.
-   * One difference between Java's Character.isWhitespace() is that this method
-   * considers a hard space (non-breaking space, or nbsp) to be whitespace.
+   * Returns true if the given character is considered to be whitespace. One difference between
+   * Java's Character.isWhitespace() is that this method considers a hard space (non-breaking space,
+   * or nbsp) to be whitespace.
    */
   protected static final boolean isWhitespace(int ch) {
     return (Character.isWhitespace(ch) || ch == 0x00a0);
   }
 
-  private static final long WS_MASK = (1L << ' ') | (1L << '\t') | (1L << '\r') | (1L << '\n') | (1L << '#') | (1L << '/') | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
+  private static final long WS_MASK =
+      (1L << ' ')
+          | (1L << '\t')
+          | (1L << '\r')
+          | (1L << '\n')
+          | (1L << '#')
+          | (1L << '/')
+          | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
 
   protected int getCharNWS() throws IOException {
     for (; ; ) {
       int ch = getChar();
       // getCharNWS is normally called in the context of expecting certain JSON special characters
       // such as ":}"],"
-      // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-      // even w/o checking the range first.  We'll only get some false-positives while using bare strings (chars "IJMc")
+      // all of these characters are below 64 (including comment chars '/' and '#', so we can make
+      // this the fast path
+      // even w/o checking the range first.  We'll only get some false-positives while using bare
+      // strings (chars "IJMc")
       if (((WS_MASK >> ch) & 0x01) == 0) {
         return ch;
-      } else if (ch <= ' ') {   // this will only be true if one of the whitespace bits was set
+      } else if (ch <= ' ') { // this will only be true if one of the whitespace bits was set
         continue;
       } else if (ch == '/') {
         getSlashComment();
       } else if (ch == '#') {
         getNewlineComment();
-      } else if (!isWhitespace(ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace like 0xa0
+      } else if (!isWhitespace(
+          ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace
+        // like 0xa0
         return ch;
       }
 
       /***
-       // getCharNWS is normally called in the context of expecting certain JSON special characters
-       // such as ":}"],"
-       // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-       if (ch < 64) {
-       if (((WS_MASK >> ch) & 0x01) == 0) return ch;
-       if (ch <= ' ') continue;  // whitespace below a normal space
-       if (ch=='/') {
-       getSlashComment();
-       } else if (ch=='#') {
-       getNewlineComment();
-       }
-       } else if (!isWhitespace(ch)) {  // check for higher whitespace like 0xA0
-       return ch;
-       }
+       * // getCharNWS is normally called in the context of expecting certain JSON special characters
+       * // such as ":}"],"
+       * // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
+       * if (ch < 64) {
+       * if (((WS_MASK >> ch) & 0x01) == 0) return ch;
+       * if (ch <= ' ') continue;  // whitespace below a normal space
+       * if (ch=='/') {
+       * getSlashComment();
+       * } else if (ch=='#') {
+       * getNewlineComment();
+       * }
+       * } else if (!isWhitespace(ch)) {  // check for higher whitespace like 0xA0
+       * return ch;
+       * }
        ***/
 
-      /** older code
-       switch (ch) {
-       case ' ' :
-       case '\t' :
-       case '\r' :
-       case '\n' :
-       continue outer;
-       case '#' :
-       getNewlineComment();
-       continue outer;
-       case '/' :
-       getSlashComment();
-       continue outer;
-       default:
-       return ch;
-       }
-       **/
+      /**
+       * older code switch (ch) { case ' ' : case '\t' : case '\r' : case '\n' : continue outer;
+       * case '#' : getNewlineComment(); continue outer; case '/' : getSlashComment(); continue
+       * outer; default: return ch; }
+       */
     }
   }
 
   protected int getCharNWS(int ch) throws IOException {
     for (; ; ) {
       // getCharNWS is normally called in the context of expecting certain JSON special characters
       // such as ":}"],"
-      // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-      // even w/o checking the range first.  We'll only get some false-positives while using bare strings (chars "IJMc")
+      // all of these characters are below 64 (including comment chars '/' and '#', so we can make
+      // this the fast path
+      // even w/o checking the range first.  We'll only get some false-positives while using bare
+      // strings (chars "IJMc")
       if (((WS_MASK >> ch) & 0x01) == 0) {
         return ch;
-      } else if (ch <= ' ') {   // this will only be true if one of the whitespace bits was set
+      } else if (ch <= ' ') { // this will only be true if one of the whitespace bits was set
         // whitespace... get new char at bottom of loop
       } else if (ch == '/') {
         getSlashComment();
       } else if (ch == '#') {
         getNewlineComment();
-      } else if (!isWhitespace(ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace like 0xa0
+      } else if (!isWhitespace(
+          ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace
+        // like 0xa0

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/graph/GraphTest.java
##########
@@ -55,21 +52,29 @@
   @BeforeClass
   public static void setupCluster() throws Exception {
     configureCluster(2)
-        .addConfig("conf", getFile("solrj").toPath().resolve("solr").resolve("configsets").resolve("streaming").resolve("conf"))
+        .addConfig(
+            "conf",
+            getFile("solrj")
+                .toPath()
+                .resolve("solr")
+                .resolve("configsets")
+                .resolve("streaming")
+                .resolve("conf"))
         .configure();
-    CollectionAdminRequest.createCollection(COLLECTION, "conf", 2, 1).process(cluster.getSolrClient());
+    CollectionAdminRequest.createCollection(COLLECTION, "conf", 2, 1)
+        .process(cluster.getSolrClient());
     cluster.waitForActiveCollection(COLLECTION, 2, 2);
   }
 
   @Before
   public void cleanIndex() throws Exception {
-    new UpdateRequest()
-        .deleteByQuery("*:*")
-        .commit(cluster.getSolrClient(), COLLECTION);
+    new UpdateRequest().deleteByQuery("*:*").commit(cluster.getSolrClient(), COLLECTION);
   }
 
   @Test
-  // commented 15-Sep-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
+  // commented 15-Sep-2018
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+  // 2-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java
##########
@@ -107,12 +117,17 @@ public void testSelectStream() throws Exception {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/SolrExceptionTest.java
##########
@@ -26,40 +26,39 @@
 import org.junit.Test;
 
 /**
- * 
- *
  * @since solr 1.3
  */
 public class SolrExceptionTest extends SolrTestCase {
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -832,77 +816,75 @@ private static boolean isUnquotedStringStart(int ch) {
   // What characters are allowed to continue an unquoted string
   // once we know we are in one.
   private static boolean isUnquotedStringChar(int ch) {
-    return Character.isJavaIdentifierPart(ch)
-        || ch == '.'
-        || ch == '-'
-        || ch == '/';
+    return Character.isJavaIdentifierPart(ch) || ch == '.' || ch == '-' || ch == '/';
 
     // would checking for a-z first speed up the common case?
 
     // possibly much more liberal unquoted string handling...
     /***
-     switch (ch) {
-     case -1:
-     case ' ':
-     case '\t':
-     case '\r':
-     case '\n':
-     case '}':
-     case ']':
-     case ',':
-     case ':':
-     case '=':   // reserved for future use
-     case '\\':  // check for backslash should come after this function call
-     return false;
-     }
-     return true;
+     * switch (ch) {
+     * case -1:
+     * case ' ':
+     * case '\t':
+     * case '\r':
+     * case '\n':
+     * case '}':
+     * case ']':
+     * case ',':
+     * case ':':
+     * case '=':   // reserved for future use
+     * case '\\':  // check for backslash should come after this function call
+     * return false;
+     * }
+     * return true;
      ***/
   }
 
-
   /*** alternate implementation
-   // middle is the pointer to the middle of a buffer to start scanning for a non-string
-   // character ('"' or "/").  start<=middle<end
-   private void readStringChars2a(CharArr arr, int middle) throws IOException {
-   int ch=0;
-   for(;;) {
-   // find the next non-string char
-   for (; middle<end; middle++) {
-   ch = buf[middle];
-   if (ch=='"' || ch=='\\') break;
-   }
-
-   arr.write(buf,start,middle-start);
-   if (middle>=end) {
-   getMore();
-   middle=start;
-   } else {
-   start = middle+1;   // set buffer pointer to correct spot
-   if (ch=='"') {
-   valstate=0;
-   return;
-   } else if (ch=='\\') {
-   arr.write(readEscapedChar());
-   if (start>=end) getMore();
-   middle=start;
-   }
-   }
-   }
-   }
+   * // middle is the pointer to the middle of a buffer to start scanning for a non-string
+   * // character ('"' or "/").  start<=middle<end
+   * private void readStringChars2a(CharArr arr, int middle) throws IOException {
+   * int ch=0;
+   * for(;;) {
+   * // find the next non-string char
+   * for (; middle<end; middle++) {
+   * ch = buf[middle];
+   * if (ch=='"' || ch=='\\') break;
+   * }
+   *
+   * arr.write(buf,start,middle-start);
+   * if (middle>=end) {
+   * getMore();
+   * middle=start;
+   * } else {
+   * start = middle+1;   // set buffer pointer to correct spot
+   * if (ch=='"') {
+   * valstate=0;
+   * return;
+   * } else if (ch=='\\') {
+   * arr.write(readEscapedChar());
+   * if (start>=end) getMore();
+   * middle=start;
+   * }
+   * }
+   * }
+   * }
    ***/
 
-
   // return the next event when parser is in a neutral state (no
   // map separators or array element separators to read
   private int next(int ch) throws IOException {
-    // TODO: try my own form of indirect jump... look up char class and index directly into handling implementation?
+    // TODO: try my own form of indirect jump... look up char class and index directly into handling
+    // implementation?
     for (; ; ) {
       switch (ch) {
-        case ' ': // this is not the exclusive list of whitespace chars... the rest are handled in default:
+        case ' ': // this is not the exclusive list of whitespace chars... the rest are handled in
+          // default:

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
##########
@@ -526,10 +668,16 @@ public void testErrorHandling() throws Exception
     assertEquals(400, ex.code());
     assertThat(ex.getMessage(), containsString("Invalid Number: ignore_exception"));
 
-    //the df=text here is a kluge for the test to supply a default field in case there is none in schema.xml
-    // alternatively, the resulting assertion could be modified to assert that no default field is specified.
-    ex = expectThrows(SolrException.class, () -> client.deleteByQuery( "{!df=text} ??::?? ignore_exception" ));
-    assertTrue(ex.getMessage().indexOf("??::?? ignore_exception")>0);  // The reason should get passed through
+    // the df=text here is a kluge for the test to supply a default field in case there is none in
+    // schema.xml
+    // alternatively, the resulting assertion could be modified to assert that no default field is
+    // specified.

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/SolrSchemalessExampleTest.java
##########
@@ -47,30 +46,36 @@
   public static void beforeClass() throws Exception {
     File tempSolrHome = createTempDir().toFile();
     // Schemaless renames schema.xml -> schema.xml.bak, and creates + modifies conf/managed-schema,
-    // which violates the test security manager's rules, which disallow writes outside the build dir,
-    // so we copy the example/example-schemaless/solr/ directory to a new temp dir where writes are allowed.
+    // which violates the test security manager's rules, which disallow writes outside the build
+    // dir,
+    // so we copy the example/example-schemaless/solr/ directory to a new temp dir where writes are
+    // allowed.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -832,77 +816,75 @@ private static boolean isUnquotedStringStart(int ch) {
   // What characters are allowed to continue an unquoted string
   // once we know we are in one.
   private static boolean isUnquotedStringChar(int ch) {
-    return Character.isJavaIdentifierPart(ch)
-        || ch == '.'
-        || ch == '-'
-        || ch == '/';
+    return Character.isJavaIdentifierPart(ch) || ch == '.' || ch == '-' || ch == '/';
 
     // would checking for a-z first speed up the common case?
 
     // possibly much more liberal unquoted string handling...
     /***
-     switch (ch) {
-     case -1:
-     case ' ':
-     case '\t':
-     case '\r':
-     case '\n':
-     case '}':
-     case ']':
-     case ',':
-     case ':':
-     case '=':   // reserved for future use
-     case '\\':  // check for backslash should come after this function call
-     return false;
-     }
-     return true;
+     * switch (ch) {
+     * case -1:
+     * case ' ':
+     * case '\t':
+     * case '\r':
+     * case '\n':
+     * case '}':
+     * case ']':
+     * case ',':
+     * case ':':
+     * case '=':   // reserved for future use
+     * case '\\':  // check for backslash should come after this function call
+     * return false;
+     * }
+     * return true;
      ***/
   }
 
-
   /*** alternate implementation
-   // middle is the pointer to the middle of a buffer to start scanning for a non-string
-   // character ('"' or "/").  start<=middle<end
-   private void readStringChars2a(CharArr arr, int middle) throws IOException {
-   int ch=0;
-   for(;;) {
-   // find the next non-string char
-   for (; middle<end; middle++) {
-   ch = buf[middle];
-   if (ch=='"' || ch=='\\') break;
-   }
-
-   arr.write(buf,start,middle-start);
-   if (middle>=end) {
-   getMore();
-   middle=start;
-   } else {
-   start = middle+1;   // set buffer pointer to correct spot
-   if (ch=='"') {
-   valstate=0;
-   return;
-   } else if (ch=='\\') {
-   arr.write(readEscapedChar());
-   if (start>=end) getMore();
-   middle=start;
-   }
-   }
-   }
-   }
+   * // middle is the pointer to the middle of a buffer to start scanning for a non-string
+   * // character ('"' or "/").  start<=middle<end
+   * private void readStringChars2a(CharArr arr, int middle) throws IOException {
+   * int ch=0;
+   * for(;;) {
+   * // find the next non-string char
+   * for (; middle<end; middle++) {
+   * ch = buf[middle];
+   * if (ch=='"' || ch=='\\') break;
+   * }
+   *
+   * arr.write(buf,start,middle-start);
+   * if (middle>=end) {
+   * getMore();
+   * middle=start;
+   * } else {
+   * start = middle+1;   // set buffer pointer to correct spot
+   * if (ch=='"') {
+   * valstate=0;
+   * return;
+   * } else if (ch=='\\') {
+   * arr.write(readEscapedChar());
+   * if (start>=end) getMore();
+   * middle=start;
+   * }
+   * }
+   * }
+   * }
    ***/
 
-
   // return the next event when parser is in a neutral state (no
   // map separators or array element separators to read
   private int next(int ch) throws IOException {
-    // TODO: try my own form of indirect jump... look up char class and index directly into handling implementation?
+    // TODO: try my own form of indirect jump... look up char class and index directly into handling
+    // implementation?
     for (; ; ) {
       switch (ch) {
-        case ' ': // this is not the exclusive list of whitespace chars... the rest are handled in default:
+        case ' ': // this is not the exclusive list of whitespace chars... the rest are handled in
+          // default:
         case '\t':
         case '\r':
         case '\n':
-          ch = getCharNWS(); // calling getCharNWS here seems faster than letting the switch handle it
+          ch = getCharNWS(); // calling getCharNWS here seems faster than letting the switch handle
+          // it

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java
##########
@@ -31,67 +31,78 @@
 import org.apache.solr.client.solrj.io.stream.metrics.SumMetric;
 import org.junit.Test;
 
-/**
- **/
-
+/** */
 public class StreamExpressionToExplanationTest extends SolrTestCase {
 
   private StreamFactory factory;
-  
+
   public StreamExpressionToExplanationTest() {
     super();
-    
-    factory = new StreamFactory()
-                    .withCollectionZkHost("collection1", "testhost:1234")
-                    .withCollectionZkHost("collection2", "testhost:1234")
-                    .withFunctionName("search", CloudSolrStream.class)
-                    .withFunctionName("select", SelectStream.class)
-                    .withFunctionName("merge", MergeStream.class)
-                    .withFunctionName("unique", UniqueStream.class)
-                    .withFunctionName("top", RankStream.class)
-                    .withFunctionName("reduce", ReducerStream.class)
-                    .withFunctionName("group", GroupOperation.class)
-                    .withFunctionName("update", UpdateStream.class)
-                    .withFunctionName("stats", StatsStream.class)
-                    .withFunctionName("facet", FacetStream.class)
-                    .withFunctionName("jdbc", JDBCStream.class)
-                    .withFunctionName("intersect", IntersectStream.class)
-                    .withFunctionName("complement", ComplementStream.class)
-                    .withFunctionName("count", CountMetric.class)
-                    .withFunctionName("sum", SumMetric.class)
-                    .withFunctionName("min", MinMetric.class)
-                    .withFunctionName("max", MaxMetric.class)
-                    .withFunctionName("avg", MeanMetric.class)
-                    .withFunctionName("daemon", DaemonStream.class)
-                    .withFunctionName("topic", TopicStream.class)
-                    ;
+
+    factory =
+        new StreamFactory()
+            .withCollectionZkHost("collection1", "testhost:1234")
+            .withCollectionZkHost("collection2", "testhost:1234")
+            .withFunctionName("search", CloudSolrStream.class)
+            .withFunctionName("select", SelectStream.class)
+            .withFunctionName("merge", MergeStream.class)
+            .withFunctionName("unique", UniqueStream.class)
+            .withFunctionName("top", RankStream.class)
+            .withFunctionName("reduce", ReducerStream.class)
+            .withFunctionName("group", GroupOperation.class)
+            .withFunctionName("update", UpdateStream.class)
+            .withFunctionName("stats", StatsStream.class)
+            .withFunctionName("facet", FacetStream.class)
+            .withFunctionName("jdbc", JDBCStream.class)
+            .withFunctionName("intersect", IntersectStream.class)
+            .withFunctionName("complement", ComplementStream.class)
+            .withFunctionName("count", CountMetric.class)
+            .withFunctionName("sum", SumMetric.class)
+            .withFunctionName("min", MinMetric.class)
+            .withFunctionName("max", MaxMetric.class)
+            .withFunctionName("avg", MeanMetric.class)
+            .withFunctionName("daemon", DaemonStream.class)
+            .withFunctionName("topic", TopicStream.class);
   }
-    
+
   @Test
   public void testCloudSolrStream() throws Exception {
     // Basic test
-    try (CloudSolrStream stream = new CloudSolrStream(StreamExpressionParser.parse("search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_i asc\")"), factory)) {
+    try (CloudSolrStream stream =
+        new CloudSolrStream(
+            StreamExpressionParser.parse(
+                "search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_i asc\")"),
+            factory)) {
       Explanation explanation = stream.toExplanation(factory);
       Assert.assertEquals("search", explanation.getFunctionName());
       Assert.assertEquals(CloudSolrStream.class.getName(), explanation.getImplementingClass());
     }
   }
-  
+
   @Test
   public void testSelectStream() throws Exception {
     // Basic test
-    try (SelectStream stream = new SelectStream(StreamExpressionParser.parse("select(\"a_s as fieldA\", search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_i asc\"))"), factory)) {
+    try (SelectStream stream =
+        new SelectStream(
+            StreamExpressionParser.parse(
+                "select(\"a_s as fieldA\", search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_i asc\"))"),
+            factory)) {
       Explanation explanation = stream.toExplanation(factory);
       Assert.assertEquals("select", explanation.getFunctionName());
       Assert.assertEquals(SelectStream.class.getName(), explanation.getImplementingClass());
     }
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
##########
@@ -82,15 +81,17 @@ public void testSingleVal4Array() {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -258,87 +245,90 @@ protected int getChar() throws IOException {
   }
 
   /**
-   * Returns true if the given character is considered to be whitespace.
-   * One difference between Java's Character.isWhitespace() is that this method
-   * considers a hard space (non-breaking space, or nbsp) to be whitespace.
+   * Returns true if the given character is considered to be whitespace. One difference between
+   * Java's Character.isWhitespace() is that this method considers a hard space (non-breaking space,
+   * or nbsp) to be whitespace.
    */
   protected static final boolean isWhitespace(int ch) {
     return (Character.isWhitespace(ch) || ch == 0x00a0);
   }
 
-  private static final long WS_MASK = (1L << ' ') | (1L << '\t') | (1L << '\r') | (1L << '\n') | (1L << '#') | (1L << '/') | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
+  private static final long WS_MASK =
+      (1L << ' ')
+          | (1L << '\t')
+          | (1L << '\r')
+          | (1L << '\n')
+          | (1L << '#')
+          | (1L << '/')
+          | (0x01); // set 1 bit so 0xA0 will be flagged as whitespace
 
   protected int getCharNWS() throws IOException {
     for (; ; ) {
       int ch = getChar();
       // getCharNWS is normally called in the context of expecting certain JSON special characters
       // such as ":}"],"
-      // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-      // even w/o checking the range first.  We'll only get some false-positives while using bare strings (chars "IJMc")
+      // all of these characters are below 64 (including comment chars '/' and '#', so we can make
+      // this the fast path
+      // even w/o checking the range first.  We'll only get some false-positives while using bare
+      // strings (chars "IJMc")
       if (((WS_MASK >> ch) & 0x01) == 0) {
         return ch;
-      } else if (ch <= ' ') {   // this will only be true if one of the whitespace bits was set
+      } else if (ch <= ' ') { // this will only be true if one of the whitespace bits was set
         continue;
       } else if (ch == '/') {
         getSlashComment();
       } else if (ch == '#') {
         getNewlineComment();
-      } else if (!isWhitespace(ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace like 0xa0
+      } else if (!isWhitespace(
+          ch)) { // we'll only reach here with certain bare strings, errors, or strange whitespace
+        // like 0xa0
         return ch;
       }
 
       /***
-       // getCharNWS is normally called in the context of expecting certain JSON special characters
-       // such as ":}"],"
-       // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-       if (ch < 64) {
-       if (((WS_MASK >> ch) & 0x01) == 0) return ch;
-       if (ch <= ' ') continue;  // whitespace below a normal space
-       if (ch=='/') {
-       getSlashComment();
-       } else if (ch=='#') {
-       getNewlineComment();
-       }
-       } else if (!isWhitespace(ch)) {  // check for higher whitespace like 0xA0
-       return ch;
-       }
+       * // getCharNWS is normally called in the context of expecting certain JSON special characters
+       * // such as ":}"],"
+       * // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
+       * if (ch < 64) {
+       * if (((WS_MASK >> ch) & 0x01) == 0) return ch;
+       * if (ch <= ' ') continue;  // whitespace below a normal space
+       * if (ch=='/') {
+       * getSlashComment();
+       * } else if (ch=='#') {
+       * getNewlineComment();
+       * }
+       * } else if (!isWhitespace(ch)) {  // check for higher whitespace like 0xA0
+       * return ch;
+       * }
        ***/
 
-      /** older code
-       switch (ch) {
-       case ' ' :
-       case '\t' :
-       case '\r' :
-       case '\n' :
-       continue outer;
-       case '#' :
-       getNewlineComment();
-       continue outer;
-       case '/' :
-       getSlashComment();
-       continue outer;
-       default:
-       return ch;
-       }
-       **/
+      /**
+       * older code switch (ch) { case ' ' : case '\t' : case '\r' : case '\n' : continue outer;
+       * case '#' : getNewlineComment(); continue outer; case '/' : getSlashComment(); continue
+       * outer; default: return ch; }
+       */
     }
   }
 
   protected int getCharNWS(int ch) throws IOException {
     for (; ; ) {
       // getCharNWS is normally called in the context of expecting certain JSON special characters
       // such as ":}"],"
-      // all of these characters are below 64 (including comment chars '/' and '#', so we can make this the fast path
-      // even w/o checking the range first.  We'll only get some false-positives while using bare strings (chars "IJMc")
+      // all of these characters are below 64 (including comment chars '/' and '#', so we can make
+      // this the fast path
+      // even w/o checking the range first.  We'll only get some false-positives while using bare
+      // strings (chars "IJMc")

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeJettyTest.java
##########
@@ -19,8 +19,11 @@
 import org.apache.solr.client.solrj.LargeVolumeTestBase;
 import org.junit.BeforeClass;
 
-// commented 4-Sep-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
-// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 14-Oct-2018
+// commented 4-Sep-2018
+// @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
+// commented out on: 24-Dec-2018
+// @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+// 14-Oct-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/embedded/LargeVolumeBinaryJettyTest.java
##########
@@ -23,7 +23,9 @@
  * @see org.apache.solr.client.solrj.impl.BinaryRequestWriter
  * @see org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec
  */
-// commented out on: 24-Dec-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 14-Oct-2018
+// commented out on: 24-Dec-2018
+// @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+// 14-Oct-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleStreamingTest.java
##########
@@ -45,34 +42,34 @@ public static void beforeTest() throws Exception {
   }
 
   @Override
-  public SolrClient createNewSolrClient()
-  {
+  public SolrClient createNewSolrClient() {
     try {
       // setup the server...
       String url = jetty.getBaseUrl().toString() + "/collection1";
       // smaller queue size hits locks more often
-      ConcurrentUpdateSolrClient concurrentClient = new ErrorTrackingConcurrentUpdateSolrClient.Builder(url)
-          .withQueueSize(2)
-          .withThreadCount(5)
-          .build();
+      ConcurrentUpdateSolrClient concurrentClient =
+          new ErrorTrackingConcurrentUpdateSolrClient.Builder(url)
+              .withQueueSize(2)
+              .withThreadCount(5)
+              .build();
       concurrentClient.setParser(new XMLResponseParser());
       concurrentClient.setRequestWriter(new RequestWriter());
       return concurrentClient;
-    }
-    
-    catch( Exception ex ) {
-      throw new RuntimeException( ex );
+    } catch (Exception ex) {
+      throw new RuntimeException(ex);
     }
   }
 
   public void testWaitOptions() throws Exception {
     // SOLR-3903
-    final List<Throwable> failures = new ArrayList<>(); // TODO these failures are not the same as recorded by the client
+    final List<Throwable> failures =
+        new ArrayList<>(); // TODO these failures are not the same as recorded by the client

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientMultiConstructorTest.java
##########
@@ -37,7 +36,8 @@
   Collection<String> hosts;
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/TestSolrJErrorHandling.java
##########
@@ -334,43 +341,50 @@ public void testRawSocket() throws Exception {
       byte[] whitespace = whitespace(1000000);
       bodyLen += whitespace.length;
 
-      String headers = "POST /solr/collection1/update HTTP/1.1\n" +
-          "Host: localhost:" + port + "\n" +
-//        "User-Agent: curl/7.43.0\n" +
-          "Accept: */*\n" +
-          "Content-type:application/json\n" +
-          "Content-Length: " + bodyLen + "\n" +
-          "Connection: Keep-Alive\n";
+      String headers =
+          "POST /solr/collection1/update HTTP/1.1\n"
+              + "Host: localhost:"
+              + port
+              + "\n"
+              +
+              //        "User-Agent: curl/7.43.0\n" +
+              "Accept: */*\n"
+              + "Content-type:application/json\n"
+              + "Content-Length: "
+              + bodyLen
+              + "\n"
+              + "Connection: Keep-Alive\n";
 
       // Headers of HTTP connection are defined to be ASCII only:
       out.write(headers.getBytes(StandardCharsets.US_ASCII));
-      out.write('\n');  // extra newline separates headers from body
+      out.write('\n'); // extra newline separates headers from body
       out.write(body);
       out.flush();
 
       // Now what if I try to write more?  This doesn't seem to throw an exception!
       Thread.sleep(1000);
-      out.write(whitespace);  // whitespace
+      out.write(whitespace); // whitespace
       out.flush();
 
-      String rbody = getResponse(in);  // This will throw a connection reset exception if you try to read past the end of the HTTP response
+      String rbody =
+          getResponse(
+              in); // This will throw a connection reset exception if you try to read past the end
+      // of the HTTP response

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
##########
@@ -405,17 +427,20 @@ public void testRouting() throws Exception {
     }
 
     assertEquals("Unexpected number of requests to expected URLs", n, increaseFromExpectedUrls);
-    assertEquals("Unexpected number of requests to unexpected URLs: " + numRequestsToUnexpectedUrls,
-        0, increaseFromUnexpectedUrls);
-
+    assertEquals(
+        "Unexpected number of requests to unexpected URLs: " + numRequestsToUnexpectedUrls,
+        0,
+        increaseFromUnexpectedUrls);
   }
 
   /**
    * Tests if the specification of 'shards.preference=replica.location:local' in the query-params
    * limits the distributed query to locally hosted shards only
    */
   @Test
-  // commented 4-Sep-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
+  // commented 4-Sep-2018
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+  // 2-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java
##########
@@ -33,67 +32,74 @@
   private static final String ANY_OTHER_ZK_HOST = "ANY_OTHER_ZK_HOST";
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSingleZkHostSpecified() throws IOException {
-    try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT))
-        .build()) {
+    try (CloudSolrClient createdClient =
+        new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSeveralZkHostsSpecifiedSingly() throws IOException {
     final List<String> zkHostList = new ArrayList<>();
-    zkHostList.add(ANY_ZK_HOST); zkHostList.add(ANY_OTHER_ZK_HOST);
-    try (CloudSolrClient createdClient = new Builder(zkHostList, Optional.of(ANY_CHROOT))
-        .build()) {
+    zkHostList.add(ANY_ZK_HOST);
+    zkHostList.add(ANY_OTHER_ZK_HOST);
+    try (CloudSolrClient createdClient = new Builder(zkHostList, Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
       assertTrue(clientZkHost.contains(ANY_OTHER_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java
##########
@@ -33,67 +32,74 @@
   private static final String ANY_OTHER_ZK_HOST = "ANY_OTHER_ZK_HOST";
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSingleZkHostSpecified() throws IOException {
-    try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT))
-        .build()) {
+    try (CloudSolrClient createdClient =
+        new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSeveralZkHostsSpecifiedSingly() throws IOException {
     final List<String> zkHostList = new ArrayList<>();
-    zkHostList.add(ANY_ZK_HOST); zkHostList.add(ANY_OTHER_ZK_HOST);
-    try (CloudSolrClient createdClient = new Builder(zkHostList, Optional.of(ANY_CHROOT))
-        .build()) {
+    zkHostList.add(ANY_ZK_HOST);
+    zkHostList.add(ANY_OTHER_ZK_HOST);
+    try (CloudSolrClient createdClient = new Builder(zkHostList, Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
       assertTrue(clientZkHost.contains(ANY_OTHER_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSeveralZkHostsSpecifiedTogether() throws IOException {
     final ArrayList<String> zkHosts = new ArrayList<String>();
     zkHosts.add(ANY_ZK_HOST);
     zkHosts.add(ANY_OTHER_ZK_HOST);
-    try(CloudSolrClient createdClient = new Builder(zkHosts, Optional.of(ANY_CHROOT)).build()) {
+    try (CloudSolrClient createdClient = new Builder(zkHosts, Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
       assertTrue(clientZkHost.contains(ANY_OTHER_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testByDefaultConfiguresClientToSendUpdatesOnlyToShardLeaders() throws IOException {
-    try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
+    try (CloudSolrClient createdClient =
+        new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
       assertTrue(createdClient.isUpdatesToLeaders() == true);
     }
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java
##########
@@ -877,80 +951,96 @@ public void testRetryUpdatesWhenClusterStateIsStale() throws Exception {
 
     final JettySolrRunner old_leader_node = cluster.getJettySolrRunners().get(0);
     final JettySolrRunner new_leader_node = cluster.getJettySolrRunners().get(1);
-    
+
     // start with exactly 1 shard/replica...
-    assertEquals("Couldn't create collection", 0,
-                 CollectionAdminRequest.createCollection(COL, "conf", 1, 1)
-                 .setCreateNodeSet(old_leader_node.getNodeName())
-                 .process(cluster.getSolrClient()).getStatus());
+    assertEquals(
+        "Couldn't create collection",
+        0,
+        CollectionAdminRequest.createCollection(COL, "conf", 1, 1)
+            .setCreateNodeSet(old_leader_node.getNodeName())
+            .process(cluster.getSolrClient())
+            .getStatus());
     cluster.waitForActiveCollection(COL, 1, 1);
 
     // determine the coreNodeName of only current replica
-    Collection<Slice> slices = cluster.getSolrClient().getZkStateReader().getClusterState().getCollection(COL).getSlices();
+    Collection<Slice> slices =
+        cluster.getSolrClient().getZkStateReader().getClusterState().getCollection(COL).getSlices();
     assertEquals(1, slices.size()); // sanity check
     Slice slice = slices.iterator().next();
     assertEquals(1, slice.getReplicas().size()); // sanity check
     final String old_leader_core_node_name = slice.getLeader().getName();
 
     // NOTE: creating our own CloudSolrClient whose settings we can muck with...
-    try (CloudSolrClient stale_client = new CloudSolrClientBuilder
-        (Collections.singletonList(cluster.getZkServer().getZkAddress()), Optional.empty())
-        .sendDirectUpdatesToAnyShardReplica()
-        .withParallelUpdates(true)
-        .build()) {
+    try (CloudSolrClient stale_client =
+        new CloudSolrClientBuilder(
+                Collections.singletonList(cluster.getZkServer().getZkAddress()), Optional.empty())
+            .sendDirectUpdatesToAnyShardReplica()
+            .withParallelUpdates(true)
+            .build()) {
       // don't let collection cache entries get expired, even on a slow machine...
       stale_client.setCollectionCacheTTl(Integer.MAX_VALUE);
       stale_client.setDefaultCollection(COL);
-     
+
       // do a query to populate stale_client's cache...
       assertEquals(0, stale_client.query(new SolrQuery("*:*")).getResults().getNumFound());
-      
+
       // add 1 replica on a diff node...
-      assertEquals("Couldn't create collection", 0,
-                   CollectionAdminRequest.addReplicaToShard(COL, "shard1")
-                   .setNode(new_leader_node.getNodeName())
-                   // NOTE: don't use our stale_client for this -- don't tip it off of a collection change
-                   .process(cluster.getSolrClient()).getStatus());
-      AbstractDistribZkTestBase.waitForRecoveriesToFinish
-        (COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
-      
+      assertEquals(
+          "Couldn't create collection",
+          0,
+          CollectionAdminRequest.addReplicaToShard(COL, "shard1")
+              .setNode(new_leader_node.getNodeName())
+              // NOTE: don't use our stale_client for this -- don't tip it off of a collection
+              // change
+              .process(cluster.getSolrClient())
+              .getStatus());
+      AbstractDistribZkTestBase.waitForRecoveriesToFinish(
+          COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
+
       // ...and delete our original leader.
-      assertEquals("Couldn't create collection", 0,
-                   CollectionAdminRequest.deleteReplica(COL, "shard1", old_leader_core_node_name)
-                   // NOTE: don't use our stale_client for this -- don't tip it off of a collection change
-                   .process(cluster.getSolrClient()).getStatus());
-      AbstractDistribZkTestBase.waitForRecoveriesToFinish
-        (COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
-
-      // stale_client's collection state cache should now only point at a leader that no longer exists.
-      
+      assertEquals(
+          "Couldn't create collection",
+          0,
+          CollectionAdminRequest.deleteReplica(COL, "shard1", old_leader_core_node_name)
+              // NOTE: don't use our stale_client for this -- don't tip it off of a collection
+              // change
+              .process(cluster.getSolrClient())
+              .getStatus());
+      AbstractDistribZkTestBase.waitForRecoveriesToFinish(
+          COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
+
+      // stale_client's collection state cache should now only point at a leader that no longer
+      // exists.
+
       // attempt a (direct) update that should succeed in spite of cached cluster state
       // pointing solely to a node that's no longer part of our collection...
       assertEquals(0, (new UpdateRequest().add("id", "1").commit(stale_client, COL)).getStatus());
       assertEquals(1, stale_client.query(new SolrQuery("*:*")).getResults().getNumFound());
-      
     }
   }
-  
 
   private static void checkSingleServer(NamedList<Object> response) {
     final RouteResponse<?> rr = (RouteResponse<?>) response;
-    final Map<String,? extends LBSolrClient.Req> routes = rr.getRoutes();
-    final Iterator<? extends Map.Entry<String,? extends LBSolrClient.Req>> it =
+    final Map<String, ? extends LBSolrClient.Req> routes = rr.getRoutes();
+    final Iterator<? extends Map.Entry<String, ? extends LBSolrClient.Req>> it =
         routes.entrySet().iterator();
     while (it.hasNext()) {
-      Map.Entry<String,? extends LBSolrClient.Req> entry = it.next();
-        assertEquals("wrong number of servers: "+entry.getValue().getServers(),
-            1, entry.getValue().getServers().size());
+      Map.Entry<String, ? extends LBSolrClient.Req> entry = it.next();
+      assertEquals(
+          "wrong number of servers: " + entry.getValue().getServers(),
+          1,
+          entry.getValue().getServers().size());
     }
   }
 
   /**
-   * Tests if the specification of 'preferReplicaTypes` in the query-params
-   * limits the distributed query to locally hosted shards only
+   * Tests if the specification of 'preferReplicaTypes` in the query-params limits the distributed
+   * query to locally hosted shards only
    */
   @Test
-  // commented 15-Sep-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
+  // commented 15-Sep-2018
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+  // 2-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientBuilderTest.java
##########
@@ -33,67 +32,74 @@
   private static final String ANY_OTHER_ZK_HOST = "ANY_OTHER_ZK_HOST";
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSingleZkHostSpecified() throws IOException {
-    try(CloudSolrClient createdClient = new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT))
-        .build()) {
+    try (CloudSolrClient createdClient =
+        new Builder(Collections.singletonList(ANY_ZK_HOST), Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSeveralZkHostsSpecifiedSingly() throws IOException {
     final List<String> zkHostList = new ArrayList<>();
-    zkHostList.add(ANY_ZK_HOST); zkHostList.add(ANY_OTHER_ZK_HOST);
-    try (CloudSolrClient createdClient = new Builder(zkHostList, Optional.of(ANY_CHROOT))
-        .build()) {
+    zkHostList.add(ANY_ZK_HOST);
+    zkHostList.add(ANY_OTHER_ZK_HOST);
+    try (CloudSolrClient createdClient = new Builder(zkHostList, Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
       assertTrue(clientZkHost.contains(ANY_OTHER_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testSeveralZkHostsSpecifiedTogether() throws IOException {
     final ArrayList<String> zkHosts = new ArrayList<String>();
     zkHosts.add(ANY_ZK_HOST);
     zkHosts.add(ANY_OTHER_ZK_HOST);
-    try(CloudSolrClient createdClient = new Builder(zkHosts, Optional.of(ANY_CHROOT)).build()) {
+    try (CloudSolrClient createdClient = new Builder(zkHosts, Optional.of(ANY_CHROOT)).build()) {
       final String clientZkHost = createdClient.getZkHost();
-    
+
       assertTrue(clientZkHost.contains(ANY_ZK_HOST));
       assertTrue(clientZkHost.contains(ANY_OTHER_ZK_HOST));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
##########
@@ -87,25 +89,27 @@ public void testZkConnectionStringConstructorWithValidChroot() throws IOExceptio
     StringBuilder sb = new StringBuilder();
 
     List<String> hosts = new ArrayList<>();
-    for (int i=0; i<numOfZKServers; i++) {
+    for (int i = 0; i < numOfZKServers; i++) {
       String ZKString = "host" + i + ":2181";
       hosts.add(ZKString);
       sb.append(ZKString);
-      if (i<numOfZKServers -1) sb.append(",");
+      if (i < numOfZKServers - 1) sb.append(",");
     }
 
     if (withChroot) {
       sb.append(chroot);
     }
 
-    final Optional<String> chrootOption = withChroot == false ? Optional.empty() : Optional.of(chroot);
+    final Optional<String> chrootOption =
+        withChroot == false ? Optional.empty() : Optional.of(chroot);
     try (CloudSolrClient client = new CloudSolrClient.Builder(hosts, chrootOption).build()) {
       assertEquals(sb.toString(), client.getZkHost());
     }
   }
-  
+
   @Test(expected = IllegalArgumentException.class)
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientCompatibilityTest.java
##########
@@ -34,69 +34,76 @@
 
   public void testSystemPropertyFlag() {
     System.setProperty("solr.http1", "true");
-    try (Http2SolrClient client = new Http2SolrClient.Builder()
-        .build()) {
+    try (Http2SolrClient client = new Http2SolrClient.Builder().build()) {
       assertTrue(client.getHttpClient().getTransport() instanceof HttpClientTransportOverHTTP);
     }
     System.clearProperty("solr.http1");
-    try (Http2SolrClient client = new Http2SolrClient.Builder()
-        .build()) {
+    try (Http2SolrClient client = new Http2SolrClient.Builder().build()) {
       assertTrue(client.getHttpClient().getTransport() instanceof HttpClientTransportOverHTTP2);
     }
   }
 
   public void testConnectToOldNodesUsingHttp1() throws Exception {
 
-    JettyConfig jettyConfig = JettyConfig.builder()
-        .withServlet(new ServletHolder(Http2SolrClientTest.DebugServlet.class), "/debug/*")
-        .useOnlyHttp1(true)
-        .build();
+    JettyConfig jettyConfig =
+        JettyConfig.builder()
+            .withServlet(new ServletHolder(Http2SolrClientTest.DebugServlet.class), "/debug/*")
+            .useOnlyHttp1(true)
+            .build();
     createAndStartJetty(legacyExampleCollection1SolrHome(), jettyConfig);
 
-    try (Http2SolrClient client = new Http2SolrClient.Builder(jetty.getBaseUrl().toString() + "/debug/foo")
-        .useHttp1_1(true)
-        .build()) {
+    try (Http2SolrClient client =
+        new Http2SolrClient.Builder(jetty.getBaseUrl().toString() + "/debug/foo")
+            .useHttp1_1(true)
+            .build()) {
       assertTrue(client.getHttpClient().getTransport() instanceof HttpClientTransportOverHTTP);
       try {
         client.query(new SolrQuery("*:*"), SolrRequest.METHOD.GET);
-      } catch (BaseHttpSolrClient.RemoteSolrException ignored) {}
+      } catch (BaseHttpSolrClient.RemoteSolrException ignored) {
+      }
     } finally {
       afterSolrJettyTestBase();
     }
   }
 
   public void testConnectToNewNodesUsingHttp1() throws Exception {
 
-    JettyConfig jettyConfig = JettyConfig.builder()
-        .withServlet(new ServletHolder(Http2SolrClientTest.DebugServlet.class), "/debug/*")
-        .useOnlyHttp1(false)
-        .build();
+    JettyConfig jettyConfig =
+        JettyConfig.builder()
+            .withServlet(new ServletHolder(Http2SolrClientTest.DebugServlet.class), "/debug/*")
+            .useOnlyHttp1(false)
+            .build();
     createAndStartJetty(legacyExampleCollection1SolrHome(), jettyConfig);
 
-    try (Http2SolrClient client = new Http2SolrClient.Builder(jetty.getBaseUrl().toString() + "/debug/foo")
-        .useHttp1_1(true)
-        .build()) {
+    try (Http2SolrClient client =
+        new Http2SolrClient.Builder(jetty.getBaseUrl().toString() + "/debug/foo")
+            .useHttp1_1(true)
+            .build()) {
       assertTrue(client.getHttpClient().getTransport() instanceof HttpClientTransportOverHTTP);
       try {
         client.query(new SolrQuery("*:*"), SolrRequest.METHOD.GET);
-      } catch (BaseHttpSolrClient.RemoteSolrException ignored) {}
+      } catch (BaseHttpSolrClient.RemoteSolrException ignored) {
+      }
     } finally {
       afterSolrJettyTestBase();
     }
   }
 
   public void testConnectToOldNodesUsingHttp2() throws Exception {
-    // if this test some how failure, this mean that Jetty client now be able to switch between HTTP/1
-    // and HTTP/2.2 protocol dynamically therefore rolling updates will be easier we should then notify this to users
-    JettyConfig jettyConfig = JettyConfig.builder()
-        .withServlet(new ServletHolder(Http2SolrClientTest.DebugServlet.class), "/debug/*")
-        .useOnlyHttp1(true)
-        .build();
+    // if this test some how failure, this mean that Jetty client now be able to switch between
+    // HTTP/1
+    // and HTTP/2.2 protocol dynamically therefore rolling updates will be easier we should then
+    // notify this to users

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/TupleTest.java
##########
@@ -16,208 +16,219 @@
  */
 package org.apache.solr.client.solrj.io;
 
-import org.apache.solr.SolrTestCase;
-import org.apache.solr.common.MapWriter.EntryWriter;
-import org.apache.solr.common.params.StreamParams;
-import org.junit.Test;
-
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
+import org.apache.solr.SolrTestCase;
+import org.apache.solr.common.MapWriter.EntryWriter;
+import org.apache.solr.common.params.StreamParams;
+import org.junit.Test;
 
 public class TupleTest extends SolrTestCase {
 
-    @Test
-    public void putAllSetsEOFMarker() {
-        final Map<String, Object> fields = new HashMap<>();
-        fields.put("field-one", new Object());
-        fields.put("field-two", new Object());
-        fields.put(StreamParams.EOF, true);
-
-        final Tuple tuple = new Tuple();
-        tuple.putAll(fields);
-
-        assertTrue(tuple.EOF);
-    }
-
-    @Test
-    public void putAllSetsEXCEPTIONMarker() {
-        final Map<String, Object> fields = new HashMap<>();
-        fields.put("field-one", new Object());
-        fields.put("field-two", new Object());
-        fields.put(StreamParams.EXCEPTION, "exception");
-
-        final Tuple tuple = new Tuple();
-        tuple.putAll(fields);
-
-        assertTrue(tuple.EXCEPTION);
-    }
-
-    @Test
-    public void copyTest() {
-        final Map<String, Object> fields = new HashMap<>();
-        fields.put("field-one", new Object());
-        fields.put("field-two", new Object());
-        fields.put(StreamParams.EXCEPTION, "exception");
-        fields.put(StreamParams.EOF, true);
-        final Tuple original = new Tuple();
-        original.putAll(fields);
-        original.setFieldNames(new ArrayList<>(Arrays.asList("field-one", "field-two")));
-        original.setFieldLabels(new HashMap<>(Map.ofEntries(
-                Map.entry("field-one", "field one"),
-                Map.entry("field-two", "field two")
-        )));
-
-        final Tuple copy = new Tuple(original);
-
-        assertEquals(original.getFields().entrySet().size(), copy.getFields().entrySet().size());
-        assertEquals(original.getFieldNames().size(), copy.getFieldNames().size());
-        assertEquals(original.getFieldLabels().entrySet().size(), copy.getFieldLabels().entrySet().size());
-        assertEquals(original.EOF, copy.EOF);
-        assertEquals(original.EXCEPTION, copy.EXCEPTION);
-    }
-
-    @Test
-    public void cloneTest() {
-        final Map<String, Object> fields = new HashMap<>();
-        fields.put("field-one", new Object());
-        fields.put("field-two", new Object());
-        fields.put(StreamParams.EXCEPTION, "exception");
-        fields.put(StreamParams.EOF, true);
-        final Tuple original = new Tuple();
-        original.putAll(fields);
-        original.setFieldNames(new ArrayList<>(Arrays.asList("field-one", "field-two")));
-        original.setFieldLabels(new HashMap<>(Map.ofEntries(
-                Map.entry("field-one", "field one"),
-                Map.entry("field-two", "field two")
-        )));
-
-        final Tuple clone = original.clone();
-
-        assertEquals(original.getFields().entrySet().size(), clone.getFields().entrySet().size());
-        assertEquals(original.getFieldNames().size(), clone.getFieldNames().size());
-        assertEquals(original.getFieldLabels().entrySet().size(), clone.getFieldLabels().entrySet().size());
-        assertEquals(original.EOF, clone.EOF);
-        assertEquals(original.EXCEPTION, clone.EXCEPTION);
-    }
-
-    @Test
-    public void mergeTest() {
-        final Map<String, Object> commonFields = new HashMap<>();
-        commonFields.put("field-one", new Object());
-        commonFields.put("field-two", new Object());
-        commonFields.put("field-three", new Object());
-        commonFields.put(StreamParams.EXCEPTION, "exception");
-        commonFields.put(StreamParams.EOF, true);
-
-        final Tuple tupleOne = new Tuple();
-        tupleOne.putAll(commonFields);
-        tupleOne.setFieldNames(new ArrayList<>(Arrays.asList("field-one-name", "field-two-name", "field-three-name")));
-        tupleOne.setFieldLabels(new HashMap<>(Map.ofEntries(
+  @Test
+  public void putAllSetsEOFMarker() {
+    final Map<String, Object> fields = new HashMap<>();
+    fields.put("field-one", new Object());
+    fields.put("field-two", new Object());
+    fields.put(StreamParams.EOF, true);
+
+    final Tuple tuple = new Tuple();
+    tuple.putAll(fields);
+
+    assertTrue(tuple.EOF);
+  }
+
+  @Test
+  public void putAllSetsEXCEPTIONMarker() {
+    final Map<String, Object> fields = new HashMap<>();
+    fields.put("field-one", new Object());
+    fields.put("field-two", new Object());
+    fields.put(StreamParams.EXCEPTION, "exception");
+
+    final Tuple tuple = new Tuple();
+    tuple.putAll(fields);
+
+    assertTrue(tuple.EXCEPTION);
+  }
+
+  @Test
+  public void copyTest() {
+    final Map<String, Object> fields = new HashMap<>();
+    fields.put("field-one", new Object());
+    fields.put("field-two", new Object());
+    fields.put(StreamParams.EXCEPTION, "exception");
+    fields.put(StreamParams.EOF, true);
+    final Tuple original = new Tuple();
+    original.putAll(fields);
+    original.setFieldNames(new ArrayList<>(Arrays.asList("field-one", "field-two")));
+    original.setFieldLabels(
+        new HashMap<>(
+            Map.ofEntries(
+                Map.entry("field-one", "field one"), Map.entry("field-two", "field two"))));
+
+    final Tuple copy = new Tuple(original);
+
+    assertEquals(original.getFields().entrySet().size(), copy.getFields().entrySet().size());
+    assertEquals(original.getFieldNames().size(), copy.getFieldNames().size());
+    assertEquals(
+        original.getFieldLabels().entrySet().size(), copy.getFieldLabels().entrySet().size());
+    assertEquals(original.EOF, copy.EOF);
+    assertEquals(original.EXCEPTION, copy.EXCEPTION);
+  }
+
+  @Test
+  public void cloneTest() {
+    final Map<String, Object> fields = new HashMap<>();
+    fields.put("field-one", new Object());
+    fields.put("field-two", new Object());
+    fields.put(StreamParams.EXCEPTION, "exception");
+    fields.put(StreamParams.EOF, true);
+    final Tuple original = new Tuple();
+    original.putAll(fields);
+    original.setFieldNames(new ArrayList<>(Arrays.asList("field-one", "field-two")));
+    original.setFieldLabels(
+        new HashMap<>(
+            Map.ofEntries(
+                Map.entry("field-one", "field one"), Map.entry("field-two", "field two"))));
+
+    final Tuple clone = original.clone();
+
+    assertEquals(original.getFields().entrySet().size(), clone.getFields().entrySet().size());
+    assertEquals(original.getFieldNames().size(), clone.getFieldNames().size());
+    assertEquals(
+        original.getFieldLabels().entrySet().size(), clone.getFieldLabels().entrySet().size());
+    assertEquals(original.EOF, clone.EOF);
+    assertEquals(original.EXCEPTION, clone.EXCEPTION);
+  }
+
+  @Test
+  public void mergeTest() {
+    final Map<String, Object> commonFields = new HashMap<>();
+    commonFields.put("field-one", new Object());
+    commonFields.put("field-two", new Object());
+    commonFields.put("field-three", new Object());
+    commonFields.put(StreamParams.EXCEPTION, "exception");
+    commonFields.put(StreamParams.EOF, true);
+
+    final Tuple tupleOne = new Tuple();
+    tupleOne.putAll(commonFields);
+    tupleOne.setFieldNames(
+        new ArrayList<>(Arrays.asList("field-one-name", "field-two-name", "field-three-name")));
+    tupleOne.setFieldLabels(
+        new HashMap<>(
+            Map.ofEntries(
                 Map.entry("field-one-name", "field-one"),
                 Map.entry("field-two-name", "field-two"),
-                Map.entry("field-three-name", "field-three")
-        )));
-
-        final Tuple tupleTwo = new Tuple();
-        tupleTwo.putAll(commonFields);
-        tupleTwo.put("field-four", new Object());
-        tupleTwo.put("new-field-two", new Object());
-        tupleTwo.setFieldNames(new ArrayList<>(Arrays.asList("field-one-name", "field-two-name", "field-four-name")));
-        tupleTwo.setFieldLabels(new HashMap<>(Map.ofEntries(
+                Map.entry("field-three-name", "field-three"))));
+
+    final Tuple tupleTwo = new Tuple();
+    tupleTwo.putAll(commonFields);
+    tupleTwo.put("field-four", new Object());
+    tupleTwo.put("new-field-two", new Object());
+    tupleTwo.setFieldNames(
+        new ArrayList<>(Arrays.asList("field-one-name", "field-two-name", "field-four-name")));
+    tupleTwo.setFieldLabels(
+        new HashMap<>(
+            Map.ofEntries(
                 Map.entry("field-one-name", "field-one"),
                 Map.entry("field-two-name", "new-field-two"),
-                Map.entry("field-four-name", "field-four")
-        )));
+                Map.entry("field-four-name", "field-four"))));
+
+    tupleOne.merge(tupleTwo);
+
+    assertEquals(7, tupleOne.getFields().size());
+    assertEquals(4, tupleOne.getFieldNames().size()); // fieldNames should contain no duplicates
+    assertEquals(4, tupleOne.getFieldLabels().size());
+    assertEquals("new-field-two", tupleOne.getFieldLabels().get("field-two-name"));
+    assertTrue(tupleOne.EOF);
+    assertTrue(tupleOne.EXCEPTION);
+  }
+
+  @Test
+  public void writeMapTest() throws IOException {
+    final Map<String, Object> commonFields = new HashMap<>();
+    commonFields.put("field a", "1");
+    commonFields.put("field b", "2");
+    commonFields.put("field c", "3");
+
+    final Tuple tupleOne = new Tuple(commonFields);
+    // label all fields
+    tupleOne.setFieldLabels(
+        new HashMap<>(
+            Map.ofEntries(
+                Map.entry("field-one", "field a"),
+                Map.entry("field-two", "field b"),
+                Map.entry("field-three", "field c"))));
+    // then choose a subset for serialisation
+    tupleOne.setFieldNames(new ArrayList<>(Arrays.asList("field-two", "field-three")));
+    {
+      final TupleEntryWriter writer = new TupleEntryWriter();
+      tupleOne.writeMap(writer);
+      assertEquals(2, writer.tuple.getFields().size());
+      assertEquals("2", writer.tuple.get("field b")); // field-two
+      assertEquals("3", writer.tuple.get("field c")); // field-three
+    }
 
-        tupleOne.merge(tupleTwo);
+    final Tuple tupleTwo = new Tuple(commonFields);
+    tupleTwo.put("field d", "4");
+    // label most fields (3 of 4)
+    tupleTwo.setFieldLabels(
+        new HashMap<>(
+            Map.ofEntries(
+                Map.entry("field-one", "field b"),
+                Map.entry("field-two", "field a"),
+                Map.entry("field-four", "field d"))));
+    // then choose a subset for serialisation
+    tupleTwo.setFieldNames(new ArrayList<>(Arrays.asList("field-two", "field-four")));
+    {
+      final TupleEntryWriter writer = new TupleEntryWriter();
+      tupleTwo.writeMap(writer);
+      assertEquals(2, writer.tuple.getFields().size());
+      assertEquals("1", writer.tuple.get("field a")); // field-two
+      assertEquals("4", writer.tuple.get("field d")); // field-four
+    }
 
-        assertEquals(7, tupleOne.getFields().size());
-        assertEquals(4, tupleOne.getFieldNames().size()); // fieldNames should contain no duplicates
-        assertEquals(4, tupleOne.getFieldLabels().size());
-        assertEquals("new-field-two", tupleOne.getFieldLabels().get("field-two-name"));
-        assertTrue(tupleOne.EOF);
-        assertTrue(tupleOne.EXCEPTION);
+    // clone and merge
+    final Tuple tupleThree = tupleOne.clone();
+    tupleThree.merge(tupleTwo);
+    assertEquals(4, tupleThree.getFieldLabels().size());
+    assertEquals(3, tupleThree.getFieldNames().size());
+    // serialise merged tuples
+    {
+      final TupleEntryWriter writer = new TupleEntryWriter();
+      tupleThree.writeMap(writer);
+      assertEquals(3, writer.tuple.getFields().size());
+      assertEquals(
+          "1",
+          writer.tuple.get(
+              "field a")); // field-two label in tupleTwo replaced field-two label from tupleOne

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
##########
@@ -865,80 +939,96 @@ public void testRetryUpdatesWhenClusterStateIsStale() throws Exception {
 
     final JettySolrRunner old_leader_node = cluster.getJettySolrRunners().get(0);
     final JettySolrRunner new_leader_node = cluster.getJettySolrRunners().get(1);
-    
+
     // start with exactly 1 shard/replica...
-    assertEquals("Couldn't create collection", 0,
-                 CollectionAdminRequest.createCollection(COL, "conf", 1, 1)
-                 .setCreateNodeSet(old_leader_node.getNodeName())
-                 .process(cluster.getSolrClient()).getStatus());
+    assertEquals(
+        "Couldn't create collection",
+        0,
+        CollectionAdminRequest.createCollection(COL, "conf", 1, 1)
+            .setCreateNodeSet(old_leader_node.getNodeName())
+            .process(cluster.getSolrClient())
+            .getStatus());
     cluster.waitForActiveCollection(COL, 1, 1);
 
     // determine the coreNodeName of only current replica
-    Collection<Slice> slices = cluster.getSolrClient().getZkStateReader().getClusterState().getCollection(COL).getSlices();
+    Collection<Slice> slices =
+        cluster.getSolrClient().getZkStateReader().getClusterState().getCollection(COL).getSlices();
     assertEquals(1, slices.size()); // sanity check
     Slice slice = slices.iterator().next();
     assertEquals(1, slice.getReplicas().size()); // sanity check
     final String old_leader_core_node_name = slice.getLeader().getName();
 
     // NOTE: creating our own CloudSolrClient whose settings we can muck with...
-    try (CloudSolrClient stale_client = new CloudSolrClientBuilder
-        (Collections.singletonList(cluster.getZkServer().getZkAddress()), Optional.empty())
-        .sendDirectUpdatesToAnyShardReplica()
-        .withParallelUpdates(true)
-        .build()) {
+    try (CloudSolrClient stale_client =
+        new CloudSolrClientBuilder(
+                Collections.singletonList(cluster.getZkServer().getZkAddress()), Optional.empty())
+            .sendDirectUpdatesToAnyShardReplica()
+            .withParallelUpdates(true)
+            .build()) {
       // don't let collection cache entries get expired, even on a slow machine...
       stale_client.setCollectionCacheTTl(Integer.MAX_VALUE);
       stale_client.setDefaultCollection(COL);
-     
+
       // do a query to populate stale_client's cache...
       assertEquals(0, stale_client.query(new SolrQuery("*:*")).getResults().getNumFound());
-      
+
       // add 1 replica on a diff node...
-      assertEquals("Couldn't create collection", 0,
-                   CollectionAdminRequest.addReplicaToShard(COL, "shard1")
-                   .setNode(new_leader_node.getNodeName())
-                   // NOTE: don't use our stale_client for this -- don't tip it off of a collection change
-                   .process(cluster.getSolrClient()).getStatus());
-      AbstractDistribZkTestBase.waitForRecoveriesToFinish
-        (COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
-      
+      assertEquals(
+          "Couldn't create collection",
+          0,
+          CollectionAdminRequest.addReplicaToShard(COL, "shard1")
+              .setNode(new_leader_node.getNodeName())
+              // NOTE: don't use our stale_client for this -- don't tip it off of a collection
+              // change
+              .process(cluster.getSolrClient())
+              .getStatus());
+      AbstractDistribZkTestBase.waitForRecoveriesToFinish(
+          COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
+
       // ...and delete our original leader.
-      assertEquals("Couldn't create collection", 0,
-                   CollectionAdminRequest.deleteReplica(COL, "shard1", old_leader_core_node_name)
-                   // NOTE: don't use our stale_client for this -- don't tip it off of a collection change
-                   .process(cluster.getSolrClient()).getStatus());
-      AbstractDistribZkTestBase.waitForRecoveriesToFinish
-        (COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
-
-      // stale_client's collection state cache should now only point at a leader that no longer exists.
-      
+      assertEquals(
+          "Couldn't create collection",
+          0,
+          CollectionAdminRequest.deleteReplica(COL, "shard1", old_leader_core_node_name)
+              // NOTE: don't use our stale_client for this -- don't tip it off of a collection
+              // change
+              .process(cluster.getSolrClient())
+              .getStatus());
+      AbstractDistribZkTestBase.waitForRecoveriesToFinish(
+          COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
+
+      // stale_client's collection state cache should now only point at a leader that no longer
+      // exists.
+
       // attempt a (direct) update that should succeed in spite of cached cluster state
       // pointing solely to a node that's no longer part of our collection...
       assertEquals(0, (new UpdateRequest().add("id", "1").commit(stale_client, COL)).getStatus());
       assertEquals(1, stale_client.query(new SolrQuery("*:*")).getResults().getNumFound());
-      
     }
   }
 
   @SuppressWarnings({"rawtypes", "unchecked"})
   private static void checkSingleServer(NamedList<Object> response) {
     final CloudSolrClient.RouteResponse rr = (CloudSolrClient.RouteResponse) response;
-    final Map<String,LBSolrClient.Req> routes = rr.getRoutes();
-    final Iterator<Map.Entry<String,LBSolrClient.Req>> it =
-        routes.entrySet().iterator();
+    final Map<String, LBSolrClient.Req> routes = rr.getRoutes();
+    final Iterator<Map.Entry<String, LBSolrClient.Req>> it = routes.entrySet().iterator();
     while (it.hasNext()) {
-      Map.Entry<String,LBSolrClient.Req> entry = it.next();
-        assertEquals("wrong number of servers: "+entry.getValue().getServers(),
-            1, entry.getValue().getServers().size());
+      Map.Entry<String, LBSolrClient.Req> entry = it.next();
+      assertEquals(
+          "wrong number of servers: " + entry.getValue().getServers(),
+          1,
+          entry.getValue().getServers().size());
     }
   }
 
   /**
-   * Tests if the specification of 'preferReplicaTypes` in the query-params
-   * limits the distributed query to locally hosted shards only
+   * Tests if the specification of 'preferReplicaTypes` in the query-params limits the distributed
+   * query to locally hosted shards only
    */
   @Test
-  // commented 15-Sep-2018 @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // 2-Aug-2018
+  // commented 15-Sep-2018
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") //
+  // 2-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamDecoratorTest.java
##########
@@ -4308,154 +5002,197 @@ public void testParallelComplementStream() throws Exception {
   }
 
   public void testDeleteStream() throws Exception {
-    final String url = cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/" + COLLECTIONORALIAS;
+    final String url =
+        cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/" + COLLECTIONORALIAS;
     final SolrClient client = cluster.getSolrClient();
-    
-    { final UpdateRequest req = new UpdateRequest();
+
+    {
+      final UpdateRequest req = new UpdateRequest();
       for (int i = 0; i < 20; i++) {
-        req.add(id, "doc_"+i, "deletable_s", "yup");
+        req.add(id, "doc_" + i, "deletable_s", "yup");
       }
       assertEquals(0, req.commit(cluster.getSolrClient(), COLLECTIONORALIAS).getStatus());
     }
 
     // fetch the _version_ param assigned each doc to test optimistic concurrency later...
-    final Map<String,Long> versions = new HashMap<>();  
-    { final QueryResponse allDocs = client.query(COLLECTIONORALIAS, params("q","deletable_s:yup",
-                                                                           "rows","100"));
+    final Map<String, Long> versions = new HashMap<>();
+    {
+      final QueryResponse allDocs =
+          client.query(
+              COLLECTIONORALIAS,
+              params(
+                  "q", "deletable_s:yup",
+                  "rows", "100"));
       assertEquals(20L, allDocs.getResults().getNumFound());
       for (SolrDocument doc : allDocs.getResults()) {
         versions.put(doc.getFirstValue("id").toString(), (Long) doc.getFirstValue("_version_"));
       }
     }
-                 
+
     { // trivially delete 1 doc
-      final String expr
-        = "commit("+COLLECTIONORALIAS+",waitSearcher=true,     "
-        + "       delete("+COLLECTIONORALIAS+",batchSize=10,   "
-        + "              tuple(id=doc_2)))                     "
-        ;
+      final String expr =
+          "commit("
+              + COLLECTIONORALIAS
+              + ",waitSearcher=true,     "
+              + "       delete("
+              + COLLECTIONORALIAS
+              + ",batchSize=10,   "
+              + "              tuple(id=doc_2)))                     ";
       final SolrStream stream = new SolrStream(url, params("qt", "/stream", "expr", expr));
-      
+
       final List<Tuple> tuples = getTuples(stream);
       assertEquals(1, tuples.size());
       assertEquals(1L, tuples.get(0).get("totalIndexed"));
-      
-      assertEquals(20L - 1L,
-                   client.query(COLLECTIONORALIAS,
-                                params("q","deletable_s:yup")).getResults().getNumFound());
+
+      assertEquals(
+          20L - 1L,
+          client
+              .query(COLLECTIONORALIAS, params("q", "deletable_s:yup"))
+              .getResults()
+              .getNumFound());
     }
 
     { // delete 5 docs, spread across 3 batches (2 + 2 + 1)
-      final String expr
-        = "commit("+COLLECTIONORALIAS+",waitSearcher=true,          "
-        + "       delete("+COLLECTIONORALIAS+",batchSize=2,list(    " // NOTE: batch size
-        + "               tuple(id=doc_3),                          "
-        + "               tuple(id=doc_11),                         "
-        + "               tuple(id=doc_7),                          "
-        + "               tuple(id=doc_17),                         "
-        + "               tuple(id=doc_15),                         "
-        + "              ) ) )                                      "
-        ;
+      final String expr =
+          "commit("
+              + COLLECTIONORALIAS
+              + ",waitSearcher=true,          "
+              + "       delete("
+              + COLLECTIONORALIAS
+              + ",batchSize=2,list(    " // NOTE: batch size
+              + "               tuple(id=doc_3),                          "
+              + "               tuple(id=doc_11),                         "
+              + "               tuple(id=doc_7),                          "
+              + "               tuple(id=doc_17),                         "
+              + "               tuple(id=doc_15),                         "
+              + "              ) ) )                                      ";
       final SolrStream stream = new SolrStream(url, params("qt", "/stream", "expr", expr));
-      
+
       final List<Tuple> tuples = getTuples(stream);
       assertEquals(3, tuples.size());
       assertEquals(2L, tuples.get(0).get("totalIndexed"));
       assertEquals(4L, tuples.get(1).get("totalIndexed"));
       assertEquals(5L, tuples.get(2).get("totalIndexed"));
-      
-      assertEquals(20L - 1L - 5L,
-                   client.query(COLLECTIONORALIAS,
-                                params("q","deletable_s:yup")).getResults().getNumFound());
+
+      assertEquals(
+          20L - 1L - 5L,
+          client
+              .query(COLLECTIONORALIAS, params("q", "deletable_s:yup"))
+              .getResults()
+              .getNumFound());
     }
 
-    { // attempt to delete 2 docs, one with correct version, one with "stale" version that should fail
+    { // attempt to delete 2 docs, one with correct version, one with "stale" version that should
+      // fail
       // but config uses TolerantUpdateProcessorFactory so batch should still be ok...
       //
-      // It would be nice it there was a more explicit, targetted, option for update() and delete() to
+      // It would be nice it there was a more explicit, targetted, option for update() and delete()
+      // to
       // ensure that even if one "batch" fails it continues with other batches.
       // See TODO in UpdateStream

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java
##########
@@ -424,79 +487,103 @@ public void testFacetStream() throws Exception {
       assertEquals(stream.getOffset(), 100);
       assertEquals(stream.getOverfetch(), -1);
     }
-
   }
-  
+
   @Test
   public void testJDBCStream() throws Exception {
     String expressionString;
-    
+
     // Basic test
-    try (JDBCStream stream = new JDBCStream(StreamExpressionParser.parse("jdbc(connection=\"jdbc:hsqldb:mem:.\", sql=\"select PEOPLE.ID, PEOPLE.NAME, COUNTRIES.COUNTRY_NAME from PEOPLE inner join COUNTRIES on PEOPLE.COUNTRY_CODE = COUNTRIES.CODE order by PEOPLE.ID\", sort=\"ID asc\")"), factory)) {
+    try (JDBCStream stream =
+        new JDBCStream(
+            StreamExpressionParser.parse(
+                "jdbc(connection=\"jdbc:hsqldb:mem:.\", sql=\"select PEOPLE.ID, PEOPLE.NAME, COUNTRIES.COUNTRY_NAME from PEOPLE inner join COUNTRIES on PEOPLE.COUNTRY_CODE = COUNTRIES.CODE order by PEOPLE.ID\", sort=\"ID asc\")"),
+            factory)) {
       expressionString = stream.toExpression(factory).toString();
       assertTrue(expressionString.contains("jdbc(connection=\"jdbc:hsqldb:mem:.\","));
-      assertTrue(expressionString.contains("sql=\"select PEOPLE.ID, PEOPLE.NAME, COUNTRIES.COUNTRY_NAME from PEOPLE inner join COUNTRIES on PEOPLE.COUNTRY_CODE = COUNTRIES.CODE order by PEOPLE.ID\""));
+      assertTrue(
+          expressionString.contains(
+              "sql=\"select PEOPLE.ID, PEOPLE.NAME, COUNTRIES.COUNTRY_NAME from PEOPLE inner join COUNTRIES on PEOPLE.COUNTRY_CODE = COUNTRIES.CODE order by PEOPLE.ID\""));
       assertTrue(expressionString.contains("sort=\"ID asc\""));
     }
   }
 
-  @Test 
+  @Test
   public void testIntersectStream() throws Exception {
     String expressionString;
-    
+
     // Basic test
-    try (IntersectStream stream = new IntersectStream(StreamExpressionParser.parse("intersect("
-                              + "search(collection1, q=\"id:(0 3 4)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
-                              + "search(collection1, q=\"id:(1 2)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
-                              + "on=\"a_f, a_s\")"), factory)) {
+    try (IntersectStream stream =
+        new IntersectStream(
+            StreamExpressionParser.parse(
+                "intersect("
+                    + "search(collection1, q=\"id:(0 3 4)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
+                    + "search(collection1, q=\"id:(1 2)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
+                    + "on=\"a_f, a_s\")"),
+            factory)) {
       expressionString = stream.toExpression(factory).toString();
       assertTrue(expressionString.contains("q=\"id:(0 3 4)\""));
       assertTrue(expressionString.contains("q=\"id:(1 2)\""));
       assertTrue(expressionString.contains("on=\"a_f,a_s\""));
     }
   }
 
-  @Test 
+  @Test
   public void testComplementStream() throws Exception {
     String expressionString;
-    
+
     // Basic test
-    try (ComplementStream stream = new ComplementStream(StreamExpressionParser.parse("complement("
-                              + "search(collection1, q=\"id:(0 3 4)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
-                              + "search(collection1, q=\"id:(1 2)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
-                              + "on=\"a_f, a_s\")"), factory)) {
+    try (ComplementStream stream =
+        new ComplementStream(
+            StreamExpressionParser.parse(
+                "complement("
+                    + "search(collection1, q=\"id:(0 3 4)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
+                    + "search(collection1, q=\"id:(1 2)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
+                    + "on=\"a_f, a_s\")"),
+            factory)) {
       expressionString = stream.toExpression(factory).toString();
       assertTrue(expressionString.contains("q=\"id:(0 3 4)\""));
       assertTrue(expressionString.contains("q=\"id:(1 2)\""));
       assertTrue(expressionString.contains("on=\"a_f,a_s\""));
     }
   }
-  
+
   @Test
   public void testCloudSolrStreamWithEscapedQuote() throws Exception {
 
-    // The purpose of this test is to ensure that a parameter with a contained " character is properly
-    // escaped when it is turned back into an expression. This is important when an expression is passed
+    // The purpose of this test is to ensure that a parameter with a contained " character is
+    // properly
+    // escaped when it is turned back into an expression. This is important when an expression is
+    // passed
     // to a worker (parallel stream) or even for other reasons when an expression is string-ified.

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java
##########
@@ -162,75 +185,97 @@ public void testStatsStream() throws Exception {
   @Test
   public void testUniqueStream() throws Exception {
     String expressionString;
-    
+
     // Basic test
-    try (UniqueStream stream = new UniqueStream(StreamExpressionParser.parse("unique(search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_i asc\"), over=\"a_f\")"), factory)) {
+    try (UniqueStream stream =
+        new UniqueStream(
+            StreamExpressionParser.parse(
+                "unique(search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_i asc\"), over=\"a_f\")"),
+            factory)) {
       expressionString = stream.toExpression(factory).toString();
       assertTrue(expressionString.contains("unique(search(collection1"));
       assertTrue(expressionString.contains("over=a_f"));
     }
   }
-  
+
   @Test
   public void testMergeStream() throws Exception {
     String expressionString;
-    
+
     // Basic test
-    try (MergeStream stream = new MergeStream(StreamExpressionParser.parse("merge("
-                              + "search(collection1, q=\"id:(0 3 4)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
-                              + "search(collection1, q=\"id:(1 2)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
-                              + "on=\"a_f asc, a_s asc\")"), factory)) {
+    try (MergeStream stream =
+        new MergeStream(
+            StreamExpressionParser.parse(
+                "merge("
+                    + "search(collection1, q=\"id:(0 3 4)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
+                    + "search(collection1, q=\"id:(1 2)\", fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc, a_s asc\"),"
+                    + "on=\"a_f asc, a_s asc\")"),
+            factory)) {
       expressionString = stream.toExpression(factory).toString();
       assertTrue(expressionString.contains("q=\"id:(0 3 4)\""));
       assertTrue(expressionString.contains("q=\"id:(1 2)\""));
       assertTrue(expressionString.contains("on=\"a_f asc,a_s asc\""));
     }
   }
-  
+
   @Test
   public void testRankStream() throws Exception {
 
     String expressionString;
-    
+
     // Basic test
-    try (RankStream stream = new RankStream(StreamExpressionParser.parse("top("
-                                              + "n=3,"
-                                              + "search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc,a_i asc\"),"
-                                              + "sort=\"a_f asc, a_i asc\")"), factory)) {
+    try (RankStream stream =
+        new RankStream(
+            StreamExpressionParser.parse(
+                "top("
+                    + "n=3,"
+                    + "search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_f asc,a_i asc\"),"
+                    + "sort=\"a_f asc, a_i asc\")"),
+            factory)) {
       expressionString = stream.toExpression(factory).toString();
       assertTrue(expressionString.contains("top(n=3,search(collection1"));
       assertTrue(expressionString.contains("sort=\"a_f asc,a_i asc\""));
       // find 2nd instance of sort
-      assertTrue(expressionString.substring(expressionString.indexOf("sort=\"a_f asc,a_i asc\"") + 1).contains("sort=\"a_f asc,a_i asc\""));
+      assertTrue(
+          expressionString
+              .substring(expressionString.indexOf("sort=\"a_f asc,a_i asc\"") + 1)
+              .contains("sort=\"a_f asc,a_i asc\""));
     }
   }
 
   @Test
   public void testReducerStream() throws Exception {
     String expressionString;
-    
+
     // Basic test
-    try (ReducerStream stream = new ReducerStream(StreamExpressionParser.parse("reduce("
-                                                  + "search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_s desc, a_f asc\"),"
-                                                  + "by=\"a_s\", group(sort=\"a_i desc\", n=\"5\"))"), factory)) {
+    try (ReducerStream stream =
+        new ReducerStream(
+            StreamExpressionParser.parse(
+                "reduce("
+                    + "search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_s desc, a_f asc\"),"
+                    + "by=\"a_s\", group(sort=\"a_i desc\", n=\"5\"))"),
+            factory)) {
       expressionString = stream.toExpression(factory).toString();
       assertTrue(expressionString.contains("reduce(search(collection1"));
       assertTrue(expressionString.contains("by=a_s"));
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamDecoratorTest.java
##########
@@ -4308,154 +5002,197 @@ public void testParallelComplementStream() throws Exception {
   }
 
   public void testDeleteStream() throws Exception {
-    final String url = cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/" + COLLECTIONORALIAS;
+    final String url =
+        cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/" + COLLECTIONORALIAS;
     final SolrClient client = cluster.getSolrClient();
-    
-    { final UpdateRequest req = new UpdateRequest();
+
+    {
+      final UpdateRequest req = new UpdateRequest();
       for (int i = 0; i < 20; i++) {
-        req.add(id, "doc_"+i, "deletable_s", "yup");
+        req.add(id, "doc_" + i, "deletable_s", "yup");
       }
       assertEquals(0, req.commit(cluster.getSolrClient(), COLLECTIONORALIAS).getStatus());
     }
 
     // fetch the _version_ param assigned each doc to test optimistic concurrency later...
-    final Map<String,Long> versions = new HashMap<>();  
-    { final QueryResponse allDocs = client.query(COLLECTIONORALIAS, params("q","deletable_s:yup",
-                                                                           "rows","100"));
+    final Map<String, Long> versions = new HashMap<>();
+    {
+      final QueryResponse allDocs =
+          client.query(
+              COLLECTIONORALIAS,
+              params(
+                  "q", "deletable_s:yup",
+                  "rows", "100"));
       assertEquals(20L, allDocs.getResults().getNumFound());
       for (SolrDocument doc : allDocs.getResults()) {
         versions.put(doc.getFirstValue("id").toString(), (Long) doc.getFirstValue("_version_"));
       }
     }
-                 
+
     { // trivially delete 1 doc
-      final String expr
-        = "commit("+COLLECTIONORALIAS+",waitSearcher=true,     "
-        + "       delete("+COLLECTIONORALIAS+",batchSize=10,   "
-        + "              tuple(id=doc_2)))                     "
-        ;
+      final String expr =
+          "commit("
+              + COLLECTIONORALIAS
+              + ",waitSearcher=true,     "
+              + "       delete("
+              + COLLECTIONORALIAS
+              + ",batchSize=10,   "
+              + "              tuple(id=doc_2)))                     ";
       final SolrStream stream = new SolrStream(url, params("qt", "/stream", "expr", expr));
-      
+
       final List<Tuple> tuples = getTuples(stream);
       assertEquals(1, tuples.size());
       assertEquals(1L, tuples.get(0).get("totalIndexed"));
-      
-      assertEquals(20L - 1L,
-                   client.query(COLLECTIONORALIAS,
-                                params("q","deletable_s:yup")).getResults().getNumFound());
+
+      assertEquals(
+          20L - 1L,
+          client
+              .query(COLLECTIONORALIAS, params("q", "deletable_s:yup"))
+              .getResults()
+              .getNumFound());
     }
 
     { // delete 5 docs, spread across 3 batches (2 + 2 + 1)
-      final String expr
-        = "commit("+COLLECTIONORALIAS+",waitSearcher=true,          "
-        + "       delete("+COLLECTIONORALIAS+",batchSize=2,list(    " // NOTE: batch size
-        + "               tuple(id=doc_3),                          "
-        + "               tuple(id=doc_11),                         "
-        + "               tuple(id=doc_7),                          "
-        + "               tuple(id=doc_17),                         "
-        + "               tuple(id=doc_15),                         "
-        + "              ) ) )                                      "
-        ;
+      final String expr =
+          "commit("
+              + COLLECTIONORALIAS
+              + ",waitSearcher=true,          "
+              + "       delete("
+              + COLLECTIONORALIAS
+              + ",batchSize=2,list(    " // NOTE: batch size
+              + "               tuple(id=doc_3),                          "
+              + "               tuple(id=doc_11),                         "
+              + "               tuple(id=doc_7),                          "
+              + "               tuple(id=doc_17),                         "
+              + "               tuple(id=doc_15),                         "
+              + "              ) ) )                                      ";
       final SolrStream stream = new SolrStream(url, params("qt", "/stream", "expr", expr));
-      
+
       final List<Tuple> tuples = getTuples(stream);
       assertEquals(3, tuples.size());
       assertEquals(2L, tuples.get(0).get("totalIndexed"));
       assertEquals(4L, tuples.get(1).get("totalIndexed"));
       assertEquals(5L, tuples.get(2).get("totalIndexed"));
-      
-      assertEquals(20L - 1L - 5L,
-                   client.query(COLLECTIONORALIAS,
-                                params("q","deletable_s:yup")).getResults().getNumFound());
+
+      assertEquals(
+          20L - 1L - 5L,
+          client
+              .query(COLLECTIONORALIAS, params("q", "deletable_s:yup"))
+              .getResults()
+              .getNumFound());
     }
 
-    { // attempt to delete 2 docs, one with correct version, one with "stale" version that should fail
+    { // attempt to delete 2 docs, one with correct version, one with "stale" version that should
+      // fail
       // but config uses TolerantUpdateProcessorFactory so batch should still be ok...
       //
-      // It would be nice it there was a more explicit, targetted, option for update() and delete() to
+      // It would be nice it there was a more explicit, targetted, option for update() and delete()
+      // to
       // ensure that even if one "batch" fails it continues with other batches.
       // See TODO in UpdateStream
 
       final long v13_ok = versions.get("doc_13").longValue();
       final long v10_bad = versions.get("doc_10").longValue() - 42L;
-      final String expr
-        = "commit("+COLLECTIONORALIAS+",waitSearcher=true,            "
-        + "       delete("+COLLECTIONORALIAS+",batchSize=10,list(     "
-        + "               tuple(id=doc_10,_version_="+v10_bad+"),     "
-        + "               tuple(id=doc_13,_version_="+v13_ok+"),      "
-        + "              ) ) )                                        "
-        ;
+      final String expr =
+          "commit("
+              + COLLECTIONORALIAS
+              + ",waitSearcher=true,            "
+              + "       delete("
+              + COLLECTIONORALIAS
+              + ",batchSize=10,list(     "
+              + "               tuple(id=doc_10,_version_="
+              + v10_bad
+              + "),     "
+              + "               tuple(id=doc_13,_version_="
+              + v13_ok
+              + "),      "
+              + "              ) ) )                                        ";
       final SolrStream stream = new SolrStream(url, params("qt", "/stream", "expr", expr));
-      
+
       final List<Tuple> tuples = getTuples(stream);
       assertEquals(1, tuples.size());
       assertEquals(2L, tuples.get(0).get("totalIndexed"));
 
       // should still be in the index due to version conflict...
-      assertEquals(1L, client.query(COLLECTIONORALIAS,
-                                    params("q","id:doc_10")).getResults().getNumFound());
+      assertEquals(
+          1L, client.query(COLLECTIONORALIAS, params("q", "id:doc_10")).getResults().getNumFound());
       // should not be in the index due to successful delete...
-      assertEquals(0L, client.query(COLLECTIONORALIAS,
-                                    params("q","id:doc_13")).getResults().getNumFound());
-      
-      assertEquals(20L - 1L - 5L - 1L,
-                   client.query(COLLECTIONORALIAS,
-                                params("q","deletable_s:yup")).getResults().getNumFound());
+      assertEquals(
+          0L, client.query(COLLECTIONORALIAS, params("q", "id:doc_13")).getResults().getNumFound());
+
+      assertEquals(
+          20L - 1L - 5L - 1L,
+          client
+              .query(COLLECTIONORALIAS, params("q", "deletable_s:yup"))
+              .getResults()
+              .getNumFound());
     }
 
-    { // by using pruneVersionField=true we should be able to ignore optimistic concurrency constraints,
+    { // by using pruneVersionField=true we should be able to ignore optimistic concurrency
+      // constraints,
       // and delete docs even if the stream we are wrapping returns _version_ values that are no
       // longer valid...

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java
##########
@@ -162,30 +192,37 @@ public void testRankStream() throws Exception {
   @Test
   public void testReducerStream() throws Exception {
     String expressionString;
-    
+
     // Basic test
-    try (ReducerStream stream = new ReducerStream(StreamExpressionParser.parse("reduce("
-                                                  + "search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_s desc, a_f asc\"),"
-                                                  + "by=\"a_s\", group(sort=\"a_i desc\", n=\"5\"))"), factory)) {
+    try (ReducerStream stream =
+        new ReducerStream(
+            StreamExpressionParser.parse(
+                "reduce("
+                    + "search(collection1, q=*:*, fl=\"id,a_s,a_i,a_f\", sort=\"a_s desc, a_f asc\"),"
+                    + "by=\"a_s\", group(sort=\"a_i desc\", n=\"5\"))"),
+            factory)) {
       Explanation explanation = stream.toExplanation(factory);
       Assert.assertEquals("reduce", explanation.getFunctionName());
       Assert.assertEquals(ReducerStream.class.getName(), explanation.getImplementingClass());
       Assert.assertEquals(1, ((StreamExplanation) explanation).getChildren().size());
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
##########
@@ -70,14 +70,16 @@ public void testZkConnectionStringSetterWithValidChroot() throws IOException {
       clientChroot = "/mychroot";
     }
 
-    try (CloudSolrClient client = (new CloudSolrClient.Builder(new ArrayList<>(hosts),
-        Optional.ofNullable(clientChroot)).build())) {
+    try (CloudSolrClient client =
+        (new CloudSolrClient.Builder(new ArrayList<>(hosts), Optional.ofNullable(clientChroot))
+            .build())) {
       assertEquals(sb.toString(), client.getZkHost());
     }
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
##########
@@ -22,69 +22,101 @@
 import org.apache.solr.common.SolrException;
 import org.junit.Test;
 
-/**
- * Unit tests for {@link CollectionAdminRequest}.
- */
+/** Unit tests for {@link CollectionAdminRequest}. */
 public class TestCollectionAdminRequest extends SolrTestCase {
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidCollectionNameRejectedWhenCreatingCollection() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid collection"));
     assertTrue(exceptionMessage.contains("invalid$collection@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
##########
@@ -37,7 +36,8 @@
   Collection<String> hosts;
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/ParallelFacetStreamOverAliasTest.java
##########
@@ -165,76 +193,89 @@ public static void after() throws Exception {
     }
   }
 
-  /**
-   * Test parallelized calls to facet expression, one for each collection in the alias
-   */
+  /** Test parallelized calls to facet expression, one for each collection in the alias */
   @Test
   public void testParallelFacetOverAlias() throws Exception {
 
-    String facetExprTmpl = "" +
-        "facet(\n" +
-        "  %s,\n" +
-        "  tiered=%s,\n" +
-        "  q=\"*:*\", \n" +
-        "  buckets=\"a_i\", \n" +
-        "  bucketSorts=\"a_i asc\", \n" +
-        "  bucketSizeLimit=" + BUCKET_SIZE_LIMIT + ", \n" +
-        "  sum(a_d), avg(a_d), min(a_d), max(a_d), count(*)\n" +
-        ")\n";
+    String facetExprTmpl =
+        ""
+            + "facet(\n"
+            + "  %s,\n"
+            + "  tiered=%s,\n"
+            + "  q=\"*:*\", \n"
+            + "  buckets=\"a_i\", \n"
+            + "  bucketSorts=\"a_i asc\", \n"
+            + "  bucketSizeLimit="
+            + BUCKET_SIZE_LIMIT
+            + ", \n"
+            + "  sum(a_d), avg(a_d), min(a_d), max(a_d), count(*)\n"
+            + ")\n";
 
     compareTieredStreamWithNonTiered(facetExprTmpl, 1);
   }
 
   /**
-   * Test parallelized calls to facet expression with multiple dimensions, one for each collection in the alias
+   * Test parallelized calls to facet expression with multiple dimensions, one for each collection
+   * in the alias
    */
   @Test
   public void testParallelFacetMultipleDimensionsOverAlias() throws Exception {
 
-    // notice we're sorting the stream by a metric, but internally, that doesn't work for parallelization
-    // so the rollup has to sort by dimensions and then apply a final re-sort once the parallel streams are merged
-    String facetExprTmpl = "" +
-        "facet(\n" +
-        "  %s,\n" +
-        "  tiered=%s,\n" +
-        "  q=\"*:*\", \n" +
-        "  buckets=\"a_i,b_i\", \n" + /* two dimensions here ~ doubles the number of tuples */
-        "  bucketSorts=\"sum(a_d) desc\", \n" +
-        "  bucketSizeLimit=" + BUCKET_SIZE_LIMIT + ", \n" +
-        "  sum(a_d), avg(a_d), min(a_d), max(a_d), count(*)\n" +
-        ")\n";
+    // notice we're sorting the stream by a metric, but internally, that doesn't work for
+    // parallelization
+    // so the rollup has to sort by dimensions and then apply a final re-sort once the parallel
+    // streams are merged

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
##########
@@ -22,69 +22,101 @@
 import org.apache.solr.common.SolrException;
 import org.junit.Test;
 
-/**
- * Unit tests for {@link CollectionAdminRequest}.
- */
+/** Unit tests for {@link CollectionAdminRequest}. */
 public class TestCollectionAdminRequest extends SolrTestCase {
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidCollectionNameRejectedWhenCreatingCollection() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid collection"));
     assertTrue(exceptionMessage.contains("invalid$collection@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidShardNamesRejectedWhenCreatingImplicitCollection() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CollectionAdminRequest.createCollectionWithImplicitRouter("fine", "fine", "invalid$shard@name",1,0,0);
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CollectionAdminRequest.createCollectionWithImplicitRouter(
+                  "fine", "fine", "invalid$shard@name", 1, 0, 0);
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid shard"));
     assertTrue(exceptionMessage.contains("invalid$shard@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidShardNamesRejectedWhenCallingSetShards() {
-    CollectionAdminRequest.Create request = CollectionAdminRequest.createCollectionWithImplicitRouter("fine",null,"fine",1);
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        request.setShards("invalid$shard@name");
-      });
+    CollectionAdminRequest.Create request =
+        CollectionAdminRequest.createCollectionWithImplicitRouter("fine", null, "fine", 1);
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              request.setShards("invalid$shard@name");
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid shard"));
     assertTrue(exceptionMessage.contains("invalid$shard@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidAliasNameRejectedWhenCreatingAlias() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CreateAlias createAliasRequest = CollectionAdminRequest.createAlias("invalid$alias@name","ignored");
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CreateAlias createAliasRequest =
+                  CollectionAdminRequest.createAlias("invalid$alias@name", "ignored");
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid alias"));
     assertTrue(exceptionMessage.contains("invalid$alias@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
##########
@@ -22,69 +22,101 @@
 import org.apache.solr.common.SolrException;
 import org.junit.Test;
 
-/**
- * Unit tests for {@link CollectionAdminRequest}.
- */
+/** Unit tests for {@link CollectionAdminRequest}. */
 public class TestCollectionAdminRequest extends SolrTestCase {
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidCollectionNameRejectedWhenCreatingCollection() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid collection"));
     assertTrue(exceptionMessage.contains("invalid$collection@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidShardNamesRejectedWhenCreatingImplicitCollection() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CollectionAdminRequest.createCollectionWithImplicitRouter("fine", "fine", "invalid$shard@name",1,0,0);
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CollectionAdminRequest.createCollectionWithImplicitRouter(
+                  "fine", "fine", "invalid$shard@name", 1, 0, 0);
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid shard"));
     assertTrue(exceptionMessage.contains("invalid$shard@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidShardNamesRejectedWhenCallingSetShards() {
-    CollectionAdminRequest.Create request = CollectionAdminRequest.createCollectionWithImplicitRouter("fine",null,"fine",1);
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        request.setShards("invalid$shard@name");
-      });
+    CollectionAdminRequest.Create request =
+        CollectionAdminRequest.createCollectionWithImplicitRouter("fine", null, "fine", 1);
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              request.setShards("invalid$shard@name");
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid shard"));
     assertTrue(exceptionMessage.contains("invalid$shard@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestConfigSetAdminRequest.java
##########
@@ -79,23 +78,26 @@ public void testDelete() {
     verifyException(delete, "ConfigSet");
   }
 
-  private void verifyException(ConfigSetAdminRequest<?,?> request, String errorContains) {
+  private void verifyException(ConfigSetAdminRequest<?, ?> request, String errorContains) {
     Exception e = expectThrows(Exception.class, request::getParams);
-    assertTrue("Expected exception message to contain: " + errorContains,
+    assertTrue(
+        "Expected exception message to contain: " + errorContains,
         e.getMessage().contains(errorContains));
   }
 
-  private static class MyConfigSetAdminRequest extends ConfigSetAdminRequest<MyConfigSetAdminRequest, ConfigSetAdminResponse> {
-      public MyConfigSetAdminRequest() {}
+  private static class MyConfigSetAdminRequest
+      extends ConfigSetAdminRequest<MyConfigSetAdminRequest, ConfigSetAdminResponse> {
+    public MyConfigSetAdminRequest() {}
 
-      @Override
-      public MyConfigSetAdminRequest getThis() {
-        return this;
-      }
+    @Override
+    public MyConfigSetAdminRequest getThis() {
+      return this;
+    }
 
-      @Override
-      public ConfigSetAdminResponse createResponse(SolrClient client) {
-        return new ConfigSetAdminResponse();
-      }
-    };
+    @Override
+    public ConfigSetAdminResponse createResponse(SolrClient client) {
+      return new ConfigSetAdminResponse();
+    }
+  }
+  ;

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java
##########
@@ -105,16 +107,17 @@ public void simple() throws IOException {
       SolrInputDocument outDoc = updateUnmarshalled.getDocuments().get(i);
       compareDocs("doc#" + i, inDoc, outDoc);
     }
-    Assert.assertEquals(updateUnmarshalled.getDeleteById().get(0),
-        updateRequest.getDeleteById().get(0));
-    Assert.assertEquals(updateUnmarshalled.getDeleteQuery().get(0),
-        updateRequest.getDeleteQuery().get(0));
+    Assert.assertEquals(
+        updateUnmarshalled.getDeleteById().get(0), updateRequest.getDeleteById().get(0));
+    Assert.assertEquals(
+        updateUnmarshalled.getDeleteQuery().get(0), updateRequest.getDeleteQuery().get(0));
 
     assertEquals("b", updateUnmarshalled.getParams().get("a"));
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
##########
@@ -22,69 +22,101 @@
 import org.apache.solr.common.SolrException;
 import org.junit.Test;
 
-/**
- * Unit tests for {@link CollectionAdminRequest}.
- */
+/** Unit tests for {@link CollectionAdminRequest}. */
 public class TestCollectionAdminRequest extends SolrTestCase {
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
##########
@@ -22,69 +22,101 @@
 import org.apache.solr.common.SolrException;
 import org.junit.Test;
 
-/**
- * Unit tests for {@link CollectionAdminRequest}.
- */
+/** Unit tests for {@link CollectionAdminRequest}. */
 public class TestCollectionAdminRequest extends SolrTestCase {
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidCollectionNameRejectedWhenCreatingCollection() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid collection"));
     assertTrue(exceptionMessage.contains("invalid$collection@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testInvalidShardNamesRejectedWhenCreatingImplicitCollection() {
-    final SolrException e = expectThrows(SolrException.class, () -> {
-        CollectionAdminRequest.createCollectionWithImplicitRouter("fine", "fine", "invalid$shard@name",1,0,0);
-      });
+    final SolrException e =
+        expectThrows(
+            SolrException.class,
+            () -> {
+              CollectionAdminRequest.createCollectionWithImplicitRouter(
+                  "fine", "fine", "invalid$shard@name", 1, 0, 0);
+            });
     final String exceptionMessage = e.getMessage();
     assertTrue(exceptionMessage.contains("Invalid shard"));
     assertTrue(exceptionMessage.contains("invalid$shard@name"));
-    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+    assertTrue(
+        exceptionMessage.contains(
+            "must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientMultiConstructorTest.java
##########
@@ -87,25 +89,27 @@ public void testZkConnectionStringConstructorWithValidChroot() throws IOExceptio
     StringBuilder sb = new StringBuilder();
 
     List<String> hosts = new ArrayList<>();
-    for (int i=0; i<numOfZKServers; i++) {
+    for (int i = 0; i < numOfZKServers; i++) {
       String ZKString = "host" + i + ":2181";
       hosts.add(ZKString);
       sb.append(ZKString);
-      if (i<numOfZKServers -1) sb.append(",");
+      if (i < numOfZKServers - 1) sb.append(",");
     }
 
     if (withChroot) {
       sb.append(chroot);
     }
 
-    final Optional<String> chrootOption = withChroot == false ? Optional.empty() : Optional.of(chroot);
+    final Optional<String> chrootOption =
+        withChroot == false ? Optional.empty() : Optional.of(chroot);
     try (CloudSolrClient client = new CloudSolrClient.Builder(hosts, chrootOption).build()) {
       assertEquals(sb.toString(), client.getZkHost());
     }
   }
-  
+
   @Test(expected = IllegalArgumentException.class)
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCoreAdmin.java
##########
@@ -126,11 +123,12 @@ public void testCustomUlogDir() throws Exception {
       req.setIsTransient(true);
       req.process(client);
 
-      // Show that the newly-created core has values for load on startup and transient different than defaults due to the
+      // Show that the newly-created core has values for load on startup and transient different
+      // than defaults due to the
       // above.

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java
##########
@@ -76,7 +78,8 @@ public void testSetResponse() throws Exception {
     assertFalse(iter.hasNext());
   }
 
-  //================================================ Helper Methods ==================================================
+  // ================================================ Helper Methods
+  // ==================================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/json/JsonQueryRequestUnitTest.java
##########
@@ -310,10 +373,11 @@ private String writeRequestToJson(JsonQueryRequest request, boolean trimWhitespa
     try {
       writer.write(os);
       final String rawJsonString = new String(os.toByteArray(), StandardCharsets.UTF_8);
-      // Trimming whitespace makes our assertions in these tests more stable (independent of JSON formatting) so we do
+      // Trimming whitespace makes our assertions in these tests more stable (independent of JSON
+      // formatting) so we do
       // it by default.  But we leave the option open in case the JSON fields have spaces.

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java
##########
@@ -151,55 +156,65 @@ public void testIteratable() throws IOException {
     SolrInputField iter = outDoc.getField("iter");
     Assert.assertNotNull("iter field is null", iter);
     Object iterVal = iter.getValue();
-    Assert.assertTrue("iterVal is not a Collection",
-        iterVal instanceof Collection);
+    Assert.assertTrue("iterVal is not a Collection", iterVal instanceof Collection);
     Assert.assertEquals("iterVal contents", values, iterVal);
-
   }
 
-  //this format accepts a 1:1 mapping of the json format and javabin format
+  // this format accepts a 1:1 mapping of the json format and javabin format
   public void testStreamableInputDocFormat() throws IOException {
     Map<String, Object> m = new LinkedHashMap<>();
     m.put("id", "1");
     m.put("desc", "The desc 1");
-    m.put(CHILDDOC, (MapWriter) ew -> {
-      ew.put("id","1.1");
-      ew.put("desc" ,"The desc 1.1");
-      ew.put(CHILDDOC, (IteratorWriter) iw -> {
-        iw.add(Map.of("id", "1.1.1","desc","The desc 1.1.1"));
-        iw.add((MapWriter) ew1 -> {
-          ew1.put("id", "1.1.2");
-          ew1.put("desc", "The desc 1.1.2");
-        });
-      });
-    });
-    MapWriter m2 = ew -> {
-      ew.put("id", "2");
-      ew.put("des", "The desc 2");
-    };
+    m.put(
+        CHILDDOC,
+        (MapWriter)
+            ew -> {
+              ew.put("id", "1.1");
+              ew.put("desc", "The desc 1.1");
+              ew.put(
+                  CHILDDOC,
+                  (IteratorWriter)
+                      iw -> {
+                        iw.add(Map.of("id", "1.1.1", "desc", "The desc 1.1.1"));
+                        iw.add(
+                            (MapWriter)
+                                ew1 -> {
+                                  ew1.put("id", "1.1.2");
+                                  ew1.put("desc", "The desc 1.1.2");
+                                });
+                      });
+            });
+    MapWriter m2 =
+        ew -> {
+          ew.put("id", "2");
+          ew.put("des", "The desc 2");
+        };
 
     List<Object> l = new ArrayList<>();
     l.add(m);
     l.add(m2);
     ByteArrayOutputStream baos = new ByteArrayOutputStream();
     new JavaBinCodec().marshal(l.iterator(), baos);
 
-    List<SolrInputDocument>  l2 = new ArrayList<>();
+    List<SolrInputDocument> l2 = new ArrayList<>();
 
-    new JavaBinUpdateRequestCodec().unmarshal(new ByteArrayInputStream(baos.toByteArray()), (document, req, commitWithin, override) -> l2.add(document));
+    new JavaBinUpdateRequestCodec()
+        .unmarshal(
+            new ByteArrayInputStream(baos.toByteArray()),
+            (document, req, commitWithin, override) -> l2.add(document));
 
-   assertEquals(l2.get(0).getChildDocuments().size(), 1);
-
-   Object o = Utils.fromJSONString(Utils.writeJson(l.get(0), new StringWriter(), true).toString());
-   Object cdoc = Utils.getObjectByPath(o, false, CHILDDOC);
-   assertEquals(Utils.writeJson(cdoc, new StringWriter(), true).toString(),
-       Utils.writeJson(l2.get(0).getChildDocuments().get(0) ,new StringWriter(), true).toString());
+    assertEquals(l2.get(0).getChildDocuments().size(), 1);
 
+    Object o = Utils.fromJSONString(Utils.writeJson(l.get(0), new StringWriter(), true).toString());
+    Object cdoc = Utils.getObjectByPath(o, false, CHILDDOC);
+    assertEquals(
+        Utils.writeJson(cdoc, new StringWriter(), true).toString(),
+        Utils.writeJson(l2.get(0).getChildDocuments().get(0), new StringWriter(), true).toString());
   }
 
-
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestV2Request.java
##########
@@ -88,10 +91,10 @@ public void testIsCollectionRequest() {
   }
 
   @Test
-// 12-Jun-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")
+  // 12-Jun-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028")

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java
##########
@@ -94,7 +96,8 @@ public void testSetResponse() throws Exception {
     assertSame(expectedPhase, phase);
   }
 
-  //================================================ Helper Methods ==================================================
+  // ================================================ Helper Methods
+  // ==================================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/FieldAnalysisResponseTest.java
##########
@@ -16,41 +16,43 @@
  */
 package org.apache.solr.client.solrj.response;
 
-import org.apache.solr.SolrTestCase;
-import org.apache.solr.common.util.NamedList;
-import org.junit.Test;
-
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
+import org.apache.solr.SolrTestCase;
+import org.apache.solr.common.util.NamedList;
+import org.junit.Test;
 
 /**
  * A test case for the {@link FieldAnalysisResponse} class.
  *
- *
  * @since solr 1.4
  */
 public class FieldAnalysisResponseTest extends SolrTestCase {
 
   /**
-   * Tests the {@link FieldAnalysisResponse#setResponse(org.apache.solr.common.util.NamedList)} method.
+   * Tests the {@link FieldAnalysisResponse#setResponse(org.apache.solr.common.util.NamedList)}
+   * method.
    */
   @Test
   public void testSetResponse() throws Exception {
 
-    // the parsing of the analysis phases is already tested in the AnalysisResponseBaseTest. So we can just fake
+    // the parsing of the analysis phases is already tested in the AnalysisResponseBaseTest. So we
+    // can just fake
     // the phases list here and use it.

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/AnlysisResponseBaseTest.java
##########
@@ -104,13 +106,14 @@ protected TokenInfo buildTokenInfo(NamedList<?> ignored) {
   @Test
   public void testCharFilterBuildPhases() throws Exception {
     NamedList<Object> nl = new NamedList<>();
-    nl.add("CharFilter1", "CharFilterOutput"); //not list of tokens
+    nl.add("CharFilter1", "CharFilterOutput"); // not list of tokens
     AnalysisResponseBase response = new AnalysisResponseBase();
     List<AnalysisResponseBase.AnalysisPhase> phases = response.buildPhases(nl);
     assertEquals(1, phases.size());
   }
 
-  //================================================ Helper Methods ==================================================
+  // ================================================ Helper Methods
+  // ==================================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/request/TestUpdateRequestCodec.java
##########
@@ -50,7 +49,8 @@
 public class TestUpdateRequestCodec extends SolrTestCase {
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/DocumentAnalysisResponseTest.java
##########
@@ -16,41 +16,43 @@
  */
 package org.apache.solr.client.solrj.response;
 
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.solr.SolrTestCase;
 import org.apache.solr.common.util.NamedList;
 import org.junit.Test;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * A test for the {@link DocumentAnalysisResponse} class.
  *
- *
  * @since solr 1.4
  */
 public class DocumentAnalysisResponseTest extends SolrTestCase {
 
   /**
-   * Tests the {@link DocumentAnalysisResponse#setResponse(org.apache.solr.common.util.NamedList)} method
+   * Tests the {@link DocumentAnalysisResponse#setResponse(org.apache.solr.common.util.NamedList)}
+   * method
    */
   @Test
   public void testSetResponse() throws Exception {
 
-    // the parsing of the analysis phases is already tested in the AnalysisResponseBaseTest. So we can just fake
+    // the parsing of the analysis phases is already tested in the AnalysisResponseBaseTest. So we
+    // can just fake
     // the phases list here and use it.

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java
##########
@@ -213,13 +217,14 @@ public void testGroupResponse() throws Exception {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java
##########
@@ -39,18 +38,19 @@
 
 /**
  * A few tests for parsing Solr response in QueryResponse
- * 
+ *
  * @since solr 1.3
  */
-@Limit(bytes=20000)
+@Limit(bytes = 20000)
 public class QueryResponseTest extends SolrTestCase {
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/TestToleratedUpdateError.java
##########
@@ -17,63 +17,69 @@
 package org.apache.solr.common;
 
 import java.util.EnumSet;
-
+import org.apache.lucene.util.TestUtil;
 import org.apache.solr.SolrTestCase;
 import org.apache.solr.common.ToleratedUpdateError.CmdType;
 import org.apache.solr.common.util.SimpleOrderedMap;
-
-import org.apache.lucene.util.TestUtil;
 import org.junit.Test;
 
 /** Basic testing of the serialization/encapsulation code in ToleratedUpdateError */
 public class TestToleratedUpdateError extends SolrTestCase {
-  
-  private final static CmdType[] ALL_TYPES = EnumSet.allOf(CmdType.class).toArray(new CmdType[0]);
-  
+
+  private static final CmdType[] ALL_TYPES = EnumSet.allOf(CmdType.class).toArray(new CmdType[0]);
+
   public void testBasics() {
-    
-    assertFalse((new ToleratedUpdateError(CmdType.ADD, "doc1", "some error")).equals
-                (new ToleratedUpdateError(CmdType.ADD, "doc2", "some error")));
-    assertFalse((new ToleratedUpdateError(CmdType.ADD, "doc1", "some error")).equals
-                (new ToleratedUpdateError(CmdType.ADD, "doc1", "some errorxx")));
-    assertFalse((new ToleratedUpdateError(CmdType.ADD, "doc1", "some error")).equals
-                (new ToleratedUpdateError(CmdType.DELID, "doc1", "some error")));
+
+    assertFalse(
+        (new ToleratedUpdateError(CmdType.ADD, "doc1", "some error"))
+            .equals(new ToleratedUpdateError(CmdType.ADD, "doc2", "some error")));
+    assertFalse(
+        (new ToleratedUpdateError(CmdType.ADD, "doc1", "some error"))
+            .equals(new ToleratedUpdateError(CmdType.ADD, "doc1", "some errorxx")));
+    assertFalse(
+        (new ToleratedUpdateError(CmdType.ADD, "doc1", "some error"))
+            .equals(new ToleratedUpdateError(CmdType.DELID, "doc1", "some error")));
   }
 
   public void testParseMetadataErrorHandling() {
 
-    assertNull(ToleratedUpdateError.parseMetadataIfToleratedUpdateError("some other key", "some value"));
+    assertNull(
+        ToleratedUpdateError.parseMetadataIfToleratedUpdateError("some other key", "some value"));
 
     // see if someone tries to trick us into having an NPE...
     ToleratedUpdateError valid = new ToleratedUpdateError(CmdType.ADD, "doc2", "some error");
     String badKey = valid.getMetadataKey().replace(":", "X");
-    assertNull(ToleratedUpdateError.parseMetadataIfToleratedUpdateError(badKey, valid.getMetadataValue()));
+    assertNull(
+        ToleratedUpdateError.parseMetadataIfToleratedUpdateError(badKey, valid.getMetadataValue()));
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java
##########
@@ -107,12 +110,13 @@ public void testRangeFacets() throws Exception {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java
##########
@@ -62,46 +59,55 @@ private String getMapJson(String key, Object value) {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/TestDelegationTokenResponse.java
##########
@@ -62,46 +59,55 @@ private String getMapJson(String key, Object value) {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
   public void testGetResponse() throws Exception {
     DelegationTokenRequest.Get getRequest = new DelegationTokenRequest.Get();
     DelegationTokenResponse.Get getResponse = new DelegationTokenResponse.Get();
 
     // not a map
-    expectThrows(SolrException.class, () -> {
-      delegationTokenResponse(getRequest, getResponse, "");
-      getResponse.getDelegationToken();
-    });
+    expectThrows(
+        SolrException.class,
+        () -> {
+          delegationTokenResponse(getRequest, getResponse, "");
+          getResponse.getDelegationToken();
+        });
 
     // doesn't have Token outerMap
     final String someToken = "someToken";
-    delegationTokenResponse(getRequest, getResponse, getNestedMapJson("NotToken", "urlString", someToken));
+    delegationTokenResponse(
+        getRequest, getResponse, getNestedMapJson("NotToken", "urlString", someToken));
     assertNull(getResponse.getDelegationToken());
 
     // Token is not a map
     delegationTokenResponse(getRequest, getResponse, getMapJson("Token", someToken));
     expectThrows(SolrException.class, getResponse::getDelegationToken);
 
     // doesn't have urlString
-    delegationTokenResponse(getRequest, getResponse, getNestedMapJson("Token", "notUrlString", someToken));
+    delegationTokenResponse(
+        getRequest, getResponse, getNestedMapJson("Token", "notUrlString", someToken));
     assertNull(getResponse.getDelegationToken());
 
     // has Token + urlString
-    delegationTokenResponse(getRequest, getResponse, getNestedMapJson("Token", "urlString", someToken));
+    delegationTokenResponse(
+        getRequest, getResponse, getNestedMapJson("Token", "urlString", someToken));
     assertEquals(someToken, getResponse.getDelegationToken());
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/cloud/TestCloudCollectionsListeners.java
##########
@@ -115,24 +137,38 @@ public void testSimpleCloudCollectionsListener() throws Exception {
         .processAndWait(client, MAX_WAIT_TIMEOUT);
     cluster.waitForActiveCollection("testcollection2", 4, 4);
 
+    assertFalse(
+        "CloudCollectionsListener notified after removal",
+        oldResults.get(1).contains("testcollection1"));
+    assertTrue(
+        "CloudCollectionsListener does not contain old collection in list of old collections",
+        oldResults.get(2).contains("testcollection1"));
+    assertFalse(
+        "CloudCollectionsListener contains new collection in old collection set",
+        oldResults.get(1).contains("testcollection2"));
+    assertFalse(
+        "CloudCollectionsListener contains new collection in old collection set",
+        oldResults.get(2).contains("testcollection2"));
+
+    assertFalse(
+        "CloudCollectionsListener notified after removal",
+        newResults.get(1).contains("testcollection2"));
+    assertTrue(
+        "CloudCollectionsListener does not contain new collection in list of new collections",
+        newResults.get(2).contains("testcollection2"));
+
+    CollectionAdminRequest.deleteCollection("testcollection1")
+        .processAndWait(client, MAX_WAIT_TIMEOUT);
 
-    assertFalse("CloudCollectionsListener notified after removal", oldResults.get(1).contains("testcollection1"));
-    assertTrue("CloudCollectionsListener does not contain old collection in list of old collections", oldResults.get(2).contains("testcollection1"));
-    assertFalse("CloudCollectionsListener contains new collection in old collection set", oldResults.get(1).contains("testcollection2"));
-    assertFalse("CloudCollectionsListener contains new collection in old collection set", oldResults.get(2).contains("testcollection2"));
-
-    assertFalse("CloudCollectionsListener notified after removal", newResults.get(1).contains("testcollection2"));
-    assertTrue("CloudCollectionsListener does not contain new collection in list of new collections", newResults.get(2).contains("testcollection2"));
-
-    CollectionAdminRequest.deleteCollection("testcollection1").processAndWait(client, MAX_WAIT_TIMEOUT);
-
-    CollectionAdminRequest.deleteCollection("testcollection2").processAndWait(client, MAX_WAIT_TIMEOUT);
+    CollectionAdminRequest.deleteCollection("testcollection2")
+        .processAndWait(client, MAX_WAIT_TIMEOUT);
 
     client.getZkStateReader().removeCloudCollectionsListener(watcher2);
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 23-Aug-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 23-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/ContentStreamTest.java
##########
@@ -99,21 +96,23 @@ public void testURLStream() throws IOException {
     File file = new File(createTempDir().toFile(), "README");
 
     try (SolrResourceLoader srl = new SolrResourceLoader(Paths.get("").toAbsolutePath());
-         InputStream is = srl.openResource("solrj/README");
-         FileOutputStream os = new FileOutputStream(file)) {
+        InputStream is = srl.openResource("solrj/README");
+        FileOutputStream os = new FileOutputStream(file)) {
       is.transferTo(os);
     }
 
-    ContentStreamBase stream = new ContentStreamBase.URLStream(new URL(file.toURI().toASCIIString()));
+    ContentStreamBase stream =
+        new ContentStreamBase.URLStream(new URL(file.toURI().toASCIIString()));
 
     try (InputStream s = stream.getStream();
-         FileInputStream fis = new FileInputStream(file);
-         FileInputStream fis2 = new FileInputStream(file);
-         InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
-         Reader r = stream.getReader()) {
+        FileInputStream fis = new FileInputStream(file);
+        FileInputStream fis2 = new FileInputStream(file);
+        InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
+        Reader r = stream.getReader()) {
       // For File URLs, the content type is determined automatically by the mime type
       // associated with the file extension,
-      // This is inconsistent from the FileStream as that code tries to guess the content based on the 1st character.
+      // This is inconsistent from the FileStream as that code tries to guess the content based on
+      // the 1st character.
       //
       // HTTP URLS, the content type is determined by the headers.  Those are not tested here.
       //

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/cloud/TestCloudCollectionsListeners.java
##########
@@ -53,60 +53,82 @@ public static void shutdownBackgroundExecutors() {
   @Before
   public void prepareCluster() throws Exception {
     configureCluster(CLUSTER_SIZE)
-    .addConfig("config", getFile("solrj/solr/collection1/conf").toPath())
-    .configure();
-    
+        .addConfig("config", getFile("solrj/solr/collection1/conf").toPath())
+        .configure();
+
     int missingServers = CLUSTER_SIZE - cluster.getJettySolrRunners().size();
     for (int i = 0; i < missingServers; i++) {
       cluster.startJettySolrRunner();
     }
     cluster.waitForAllNodes(30);
   }
-  
+
   @After
   public void afterTest() throws Exception {
     shutdownCluster();
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 17-Aug-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 17-Aug-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java
##########
@@ -268,14 +274,17 @@ public void testForwardCompat() throws IOException {
   @Test
   public void testForwardCompatForSolrDocumentWithChildDocs() throws IOException {
     SolrDocument sdoc = generateSolrDocumentWithChildDocs();
-    try (JavaBinCodec javabin = new JavaBinCodec(); ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+    try (JavaBinCodec javabin = new JavaBinCodec();
+        ByteArrayOutputStream os = new ByteArrayOutputStream()) {
       javabin.marshal(sdoc, os);
       byte[] newFormatBytes = os.toByteArray();
 
       InputStream is = getClass().getResourceAsStream(SOLRJ_JAVABIN_BACKCOMPAT_BIN_CHILD_DOCS);
       byte[] currentFormatBytes = IOUtils.toByteArray(is);
 
-      for (int i = 1; i < currentFormatBytes.length; i++) {//ignore the first byte. It is version information
+      for (int i = 1;
+          i < currentFormatBytes.length;
+          i++) { // ignore the first byte. It is version information

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/NamedListTest.java
##########
@@ -76,7 +75,8 @@ public void testRemoveAll() {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/TestFastInputStream.java
##########
@@ -16,22 +16,21 @@
  */
 package org.apache.solr.common.util;
 
-import org.apache.solr.SolrTestCase;
-import org.junit.Test;
-
 import java.io.*;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
+import org.apache.solr.SolrTestCase;
+import org.junit.Test;
 
 /**
  * Test for FastInputStream.
  *
- *
  * @see org.apache.solr.common.util.FastInputStream
  */
 public class TestFastInputStream extends SolrTestCase {
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/response/QueryResponseTest.java
##########
@@ -257,50 +262,48 @@ public void testSimpleGroupResponse() throws Exception {
     assertEquals("708_AR", documents.get(8).getFieldValue("acco_id"));
     assertEquals("708_HI", documents.get(9).getFieldValue("acco_id"));
   }
-  
+
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/NamedListTest.java
##########
@@ -196,11 +196,12 @@ public void testRecursive() {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java
##########
@@ -16,24 +16,24 @@
  */
 package org.apache.solr.common.util;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
 import org.apache.solr.BaseDistributedSearchTestCase;
 import org.apache.solr.SolrTestCase;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.junit.Test;
 
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.util.List;
-import java.util.Random;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-
-public class TestNamedListCodec  extends SolrTestCase {
+public class TestNamedListCodec extends SolrTestCase {
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
-  public void testSimple() throws Exception{
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java
##########
@@ -106,34 +107,37 @@ public void testIterator() throws Exception{
     List<SolrDocument> list = new ArrayList<>();
 
     SolrDocument doc = new SolrDocument();
-    doc.addField( "f", fval );
-    doc.addField( "b", bval );
-    doc.addField( "s", sval );
-    doc.addField( "f", 100 );
+    doc.addField("f", fval);
+    doc.addField("b", bval);
+    doc.addField("s", sval);
+    doc.addField("f", 100);
     list.add(doc);
 
     doc = new SolrDocument();
-    doc.addField( "f", fval );
-    doc.addField( "b", bval );
-    doc.addField( "s", sval );
-    doc.addField( "f", 101 );
+    doc.addField("f", fval);
+    doc.addField("b", bval);
+    doc.addField("s", sval);
+    doc.addField("f", 101);
     list.add(doc);
 
-    nl.add("zzz",list.iterator());
+    nl.add("zzz", list.iterator());
     byte[] arr;
-    try (JavaBinCodec jbc = new JavaBinCodec(null); ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+    try (JavaBinCodec jbc = new JavaBinCodec(null);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
       jbc.marshal(nl, baos);
       arr = baos.toByteArray();
     }
-    try (JavaBinCodec jbc = new JavaBinCodec(); ByteArrayInputStream bais = new ByteArrayInputStream(arr)) {
+    try (JavaBinCodec jbc = new JavaBinCodec();
+        ByteArrayInputStream bais = new ByteArrayInputStream(arr)) {
       NamedList<?> res = (NamedList<?>) jbc.unmarshal(bais);
       List<?> l = (List<?>) res.get("zzz");
       assertEquals(list.size(), l.size());
     }
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java
##########
@@ -247,7 +254,8 @@ public Object makeRandom(int lev) {
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/noggit/TestJSONParser.java
##########
@@ -73,21 +77,13 @@ public static JSONParser getParser(String s, int type, int bufSize) {
     return parser;
   }
 
-  /** for debugging purposes
-   public void testSpecific() throws Exception {
-   JSONParser parser = getParser("[0",1,1);
-   for (;;) {
-   int ev = parser.nextEvent();
-   if (ev == JSONParser.EOF) {
-   break;
-   } else {
-   System.out.println("got " + JSONParser.getEventString(ev));
-   }
-   }
-   }
-   **/
-
+  /**
+   * for debugging purposes public void testSpecific() throws Exception { JSONParser parser =
+   * getParser("[0",1,1); for (;;) { int ev = parser.nextEvent(); if (ev == JSONParser.EOF) { break;
+   * } else { System.out.println("got " + JSONParser.getEventString(ev)); } } }
+   */

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/noggit/TestJSONParser.java
##########
@@ -417,98 +571,101 @@ public void testNumbers() throws IOException {
 
     flags = JSONParser.FLAGS_DEFAULT;
 
-    String lmin    = "-9223372036854775808";
+    String lmin = "-9223372036854775808";
     String lminNot = "-9223372036854775809";
-    String lmax    = "9223372036854775807";
+    String lmax = "9223372036854775807";
     String lmaxNot = "9223372036854775808";
 
-    String bignum="12345678987654321357975312468642099775533112244668800152637485960987654321";
+    String bignum = "12345678987654321357975312468642099775533112244668800152637485960987654321";
 
-    parse("[0,1,-1,543,-876]", new Object[]{a,o(0),o(1),o(-1),o(543),o(-876),A,e});
-    parse("[-0]",new Object[]{a,o(0),A,e});
+    parse("[0,1,-1,543,-876]", new Object[] {a, o(0), o(1), o(-1), o(543), o(-876), A, e});
+    parse("[-0]", new Object[] {a, o(0), A, e});
 
+    parse(
+        "[" + lmin + "," + lmax + "]",
+        new Object[] {a, o(Long.MIN_VALUE), o(Long.MAX_VALUE), A, e});
 
-    parse("["+lmin +"," + lmax+"]",
-        new Object[]{a,o(Long.MIN_VALUE),o(Long.MAX_VALUE),A,e});
+    parse("[" + bignum + "]", new Object[] {a, bn(bignum), A, e});
+    parse("[" + "-" + bignum + "]", new Object[] {a, bn("-" + bignum), A, e});
 
-    parse("["+bignum+"]", new Object[]{a,bn(bignum),A,e});
-    parse("["+"-"+bignum+"]", new Object[]{a,bn("-"+bignum),A,e});
+    parse("[" + lminNot + "]", new Object[] {a, bn(lminNot), A, e});
+    parse("[" + lmaxNot + "]", new Object[] {a, bn(lmaxNot), A, e});
 
-    parse("["+lminNot+"]",new Object[]{a,bn(lminNot),A,e});
-    parse("["+lmaxNot+"]",new Object[]{a,bn(lmaxNot),A,e});
-
-    parse("["+lminNot + "," + lmaxNot + "]",
-        new Object[]{a,bn(lminNot),bn(lmaxNot),A,e});
+    parse("[" + lminNot + "," + lmaxNot + "]", new Object[] {a, bn(lminNot), bn(lmaxNot), A, e});
 
     // bignum many digits on either side of decimal
     String t = bignum + "." + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
-    err("[" + t+".1" + "]"); // extra decimal
-    err("[" + "-"+t+".1" + "]");
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
+    err("[" + t + ".1" + "]"); // extra decimal
+    err("[" + "-" + t + ".1" + "]");
 
     // bignum exponent w/o fraction
     t = "1" + "e+" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     t = "1" + "E+" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     t = "1" + "e" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     t = "1" + "E" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     t = "1" + "e-" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     t = "1" + "E-" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
 
     t = bignum + "e+" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     t = bignum + "E-" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     t = bignum + "e" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
 
     t = bignum + "." + bignum + "e" + bignum;
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
 
     err("[1E]");
     err("[1E-]");
     err("[1E+]");
     err("[1E+.3]");
     err("[1E+0.3]");
     err("[1E+1e+3]");
-    err("["+bignum+"e"+"]");
-    err("["+bignum+"e-"+"]");
-    err("["+bignum+"e+"+"]");
-    err("["+bignum+"."+bignum+"."+bignum+"]");
-
-
-    double[] vals = new double[] {0,0.1,1.1,
-        Double.MAX_VALUE,
-        Double.MIN_VALUE,
-        2.2250738585072014E-308, /* Double.MIN_NORMAL */
-    };
-    for (int i=0; i<vals.length; i++) {
+    err("[" + bignum + "e" + "]");
+    err("[" + bignum + "e-" + "]");
+    err("[" + bignum + "e+" + "]");
+    err("[" + bignum + "." + bignum + "." + bignum + "]");
+
+    double[] vals =
+        new double[] {
+          0,
+          0.1,
+          1.1,
+          Double.MAX_VALUE,
+          Double.MIN_VALUE,
+          2.2250738585072014E-308, /* Double.MIN_NORMAL */
+        };
+    for (int i = 0; i < vals.length; i++) {
       double d = vals[i];
-      parse("["+d+","+-d+"]", new Object[]{a,o(d),o(-d),A,e});
+      parse("[" + d + "," + -d + "]", new Object[] {a, o(d), o(-d), A, e});
     }
 
     // MIN_NORMAL has the max number of digits (23), so check that
     // adding an extra digit causes BIGNUM to be returned.
     t = "2.2250738585072014E-308" + "0";
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
     // check it works with a leading zero too
     t = "0.2250738585072014E-308" + "0";
-    parse("["+t+","+"-"+t+"]", new Object[]{a,bn(t),bn("-"+t),A,e});
+    parse("[" + t + "," + "-" + t + "]", new Object[] {a, bn(t), bn("-" + t), A, e});
 
-    // check that overflow detection is working properly w/ numbers that don't cause a wrap to negatives
+    // check that overflow detection is working properly w/ numbers that don't cause a wrap to
+    // negatives
     // when multiplied by 10

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/TestNamedListCodec.java
##########
@@ -43,60 +43,61 @@ public void testSimple() throws Exception{
     // Set up a simple document
     NamedList<Object> r = new NamedList<>();
 
-
     nl.add("responseHeader", r);
 
-    r.add("status",0);
-    r.add("QTime",63);
+    r.add("status", 0);
+    r.add("QTime", 63);
     NamedList<Object> p = new NamedList<>();
-    r.add("params",p);
-    p.add("rows",10);
-    p.add("start",0);
-    p.add("indent","on");
-    p.add("q","ipod");
-
-
-    SolrDocumentList list =     new SolrDocumentList();
-    nl.add("response", list );
+    r.add("params", p);
+    p.add("rows", 10);
+    p.add("start", 0);
+    p.add("indent", "on");
+    p.add("q", "ipod");
+
+    SolrDocumentList list = new SolrDocumentList();
+    nl.add("response", list);
     list.setMaxScore(1.0f);
     list.setStart(10);
     list.setNumFound(12);
 
     SolrDocument doc = new SolrDocument();
-    doc.addField( "f", fval );
-    doc.addField( "b", bval );
-    doc.addField( "s", sval );
-    doc.addField( "f", 100 );
+    doc.addField("f", fval);
+    doc.addField("b", bval);
+    doc.addField("s", sval);
+    doc.addField("f", 100);
     list.add(doc);
 
     doc = new SolrDocument();
-    doc.addField( "f", fval );
-    doc.addField( "b", bval );
-    doc.addField( "s", sval );
-    doc.addField( "f", 101 );
+    doc.addField("f", fval);
+    doc.addField("b", bval);
+    doc.addField("s", sval);
+    doc.addField("f", 101);
     list.add(doc);
 
-    nl.add("zzz",doc);
+    nl.add("zzz", doc);
     byte[] arr;
-    try (JavaBinCodec jbc = new JavaBinCodec(null); ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+    try (JavaBinCodec jbc = new JavaBinCodec(null);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
       jbc.marshal(nl, baos);
       arr = baos.toByteArray();
     }
-    try (JavaBinCodec jbc = new JavaBinCodec(); ByteArrayInputStream bais = new ByteArrayInputStream(arr)) {
+    try (JavaBinCodec jbc = new JavaBinCodec();
+        ByteArrayInputStream bais = new ByteArrayInputStream(arr)) {
       NamedList<?> res = (NamedList<?>) jbc.unmarshal(bais);
       assertEquals(3, res.size());
-      assertEquals( "ipod",((NamedList<?>)((NamedList<?>)res.getVal(0)).get("params")).get("q") );
+      assertEquals("ipod", ((NamedList<?>) ((NamedList<?>) res.getVal(0)).get("params")).get("q"));
       list = (SolrDocumentList) res.getVal(1);
-      assertEquals(12,list.getNumFound() );
-      assertEquals(10,list.getStart() );
-      assertEquals(101, ((List)list.get(1).getFieldValue("f")).get(1));
+      assertEquals(12, list.getNumFound());
+      assertEquals(10, list.getStart());
+      assertEquals(101, ((List) list.get(1).getFieldValue("f")).get(1));
     }
   }
 
   @Test
-  // commented out on: 24-Dec-2018   @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
-  public void testIterator() throws Exception{
-    
+  // commented out on: 24-Dec-2018
+  // @BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018

Review comment:
       Fix this

##########
File path: solr/solrj/src/test/org/apache/solr/common/util/TestJavaBinCodec.java
##########
@@ -301,32 +307,49 @@ public void testReadMapEntryTextStreamSource() throws IOException {
     Map.Entry<Object, Object> entryFromTextDoc2_clone = getMapFromJavaBinCodec(SOLRJ_DOCS_2);
 
     // exactly same document read twice should have same content
-    assertEquals ("text-doc1 exactly same document read twice should have same content",entryFromTextDoc1,entryFromTextDoc1_clone);
+    assertEquals(
+        "text-doc1 exactly same document read twice should have same content",
+        entryFromTextDoc1,
+        entryFromTextDoc1_clone);
     // doc1 and doc2 are 2 text files with different content on line 1
-    assertNotEquals ("2 text streams with 2 different contents should be unequal",entryFromTextDoc2,entryFromTextDoc1);
+    assertNotEquals(
+        "2 text streams with 2 different contents should be unequal",
+        entryFromTextDoc2,
+        entryFromTextDoc1);
     // exactly same document read twice should have same content
-    assertEquals ("text-doc2 exactly same document read twice should have same content",entryFromTextDoc2,entryFromTextDoc2_clone);
+    assertEquals(
+        "text-doc2 exactly same document read twice should have same content",
+        entryFromTextDoc2,
+        entryFromTextDoc2_clone);
   }
 
   @Test
-  public void  testReadMapEntryBinaryStreamSource() throws IOException {
+  public void testReadMapEntryBinaryStreamSource() throws IOException {
     // now lets look at binary files
-    Map.Entry<Object, Object> entryFromBinFileA = getMapFromJavaBinCodec(SOLRJ_JAVABIN_BACKCOMPAT_BIN);
-    Map.Entry<Object, Object> entryFromBinFileA_clone = getMapFromJavaBinCodec(SOLRJ_JAVABIN_BACKCOMPAT_BIN);
+    Map.Entry<Object, Object> entryFromBinFileA =
+        getMapFromJavaBinCodec(SOLRJ_JAVABIN_BACKCOMPAT_BIN);
+    Map.Entry<Object, Object> entryFromBinFileA_clone =
+        getMapFromJavaBinCodec(SOLRJ_JAVABIN_BACKCOMPAT_BIN);
 
-    assertEquals("same map entry references should be equal",entryFromBinFileA,entryFromBinFileA);
+    assertEquals("same map entry references should be equal", entryFromBinFileA, entryFromBinFileA);
 
     // Commenting-out this test as it may have inadvertent effect on someone changing this in future
     // but keeping this in code to make a point, that even the same exact bin file,
-    // there could be sub-objects in the key or value of the maps, with types that do not implement equals
-    // and in these cases equals would fail as these sub-objects would be equated on their memory-references which is highly probbale to be unique
+    // there could be sub-objects in the key or value of the maps, with types that do not implement
+    // equals
+    // and in these cases equals would fail as these sub-objects would be equated on their
+    // memory-references which is highly probbale to be unique
     // and hence the top-level map's equals will also fail
-    // assertNotEquals("2 different references even though from same source are un-equal",entryFromBinFileA,entryFromBinFileA_clone);
-
+    // assertNotEquals("2 different references even though from same source are
+    // un-equal",entryFromBinFileA,entryFromBinFileA_clone);

Review comment:
       Fix this




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] ErickErickson commented on a change in pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
ErickErickson commented on a change in pull request #706:
URL: https://github.com/apache/solr/pull/706#discussion_r815320067



##########
File path: solr/solrj/src/java/org/apache/solr/common/params/AnalysisParams.java
##########
@@ -19,41 +19,31 @@
 /**
  * Defines the request parameters used by all analysis request handlers.
  *
- *
  * @since solr 1.4
  */
 public interface AnalysisParams {
 
-  /**
-   * The prefix for all parameters.
-   */
+  /** The prefix for all parameters. */
   static final String PREFIX = "analysis";
 
-  /**
-   * Holds the query to be analyzed.
-   */
+  /** Holds the query to be analyzed. */
   static final String QUERY = PREFIX + ".query";
 
   /**
-   * Set to {@code true} to indicate that the index tokens that match query tokens should be marked as "matched".
+   * Set to {@code true} to indicate that the index tokens that match query tokens should be marked
+   * as "matched".
    */
   static final String SHOW_MATCH = PREFIX + ".showmatch";
 
+  // ===================================== FieldAnalysisRequestHandler Params

Review comment:
       don't break?

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CloudSolrStream.java
##########
@@ -264,9 +282,10 @@ public void setStreamContext(StreamContext context) {
   }
 
   /**
-  * Opens the CloudSolrStream
-  *
-  ***/
+   * Opens the CloudSolrStream
+   *
+   * <p>*

Review comment:
       delete <p> and extra lines.

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/comp/FieldComparator.java
##########
@@ -180,13 +194,14 @@ public boolean equals(Object o) {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
     FieldComparator that = (FieldComparator) o;
-    return leftFieldName.equals(that.leftFieldName) &&
-        rightFieldName.equals(that.rightFieldName) &&
-        order == that.order; // comparator is based on the other fields so is not needed in this compare
+    return leftFieldName.equals(that.leftFieldName)
+        && rightFieldName.equals(that.rightFieldName)
+        && order == that.order; // comparator is based on the other fields so is not needed in this
+    // compare

Review comment:
       somehow don't break comment.

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientTest.java
##########
@@ -16,33 +16,36 @@
  */
 package org.apache.solr.client.solrj.impl;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.solr.client.solrj.ResponseParser;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.junit.Test;
 
-import java.io.IOException;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-
-/**
- * Test the LBHttpSolrClient.
- */
+/** Test the LBHttpSolrClient. */
 public class LBHttpSolrClientTest {
-  
+
   /**
    * Test method for {@link LBHttpSolrClient.Builder}.
-   * 
-   * Validate that the parser passed in is used in the <code>HttpSolrClient</code> instances created.
+   *
+   * <p>Validate that the parser passed in is used in the <code>HttpSolrClient</code> instances
+   * created.
    */
   @Test
-  // commented out on: 17-Feb-2019   @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added 20-Sep-2018
+  // commented out on: 17-Feb-2019
+  // @LuceneTestCase.BadApple(bugUrl="https://issues.apache.org/jira/browse/SOLR-12028") // added

Review comment:
       Should we take the whole comment out? I noticed other places you removed all the BadApple stuff, I don't know whether we're paying any attention to them any more. I fact, I did a grep of this checkout and these files contain commented-out BadApple annotations, remove them all?
   ./src/test/org/apache/solr/client/solrj/impl/LBHttpSolrClientTest.java:
   ./src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/StreamingTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExplanationTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionToExpessionTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/MathExpressionTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/MathExpressionTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/MathExpressionTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/MathExpressionTest.java:  
   ./src/test/org/apache/solr/client/solrj/io/stream/MathExpressionTest.java:  
   
   I'm sure I missed some before I thought to make the first comment about removing them, so here they are.

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/cloud/ShardTerms.java
##########
@@ -100,15 +103,16 @@ public ShardTerms increaseTerms(String leader, Set<String> replicasNeedingRecove
       String key = entry.getKey();
       if (replicasNeedingRecovery.contains(key)) foundReplicasInLowerTerms = true;
       if (Objects.equals(entry.getValue(), leaderTerm)) {
-        if(skipIncreaseTermOf(key, replicasNeedingRecovery)) {
+        if (skipIncreaseTermOf(key, replicasNeedingRecovery)) {
           saveChanges = true; // if we don't skip anybody, then there's no reason to increment
         } else {
           entry.setValue(leaderTerm + 1);
         }
       }
     }
 
-    // We should skip the optimization if there are no replicasNeedingRecovery present in local terms,
+    // We should skip the optimization if there are no replicasNeedingRecovery present in local
+    // terms,

Review comment:
       tighten

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TextLogitStream.java
##########
@@ -318,7 +364,8 @@ public void setStreamContext(StreamContext context) {
   /**
    * Opens the CloudSolrStream
    *
-   ***/
+   * <p>*

Review comment:
       delete <p>

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UpdateStream.java
##########
@@ -293,56 +330,64 @@ private void setCloudSolrClient() {
       this.cloudSolrClient.connect();
     }
   }
-  
+
   private SolrInputDocument convertTupleToSolrDocument(Tuple tuple) {
     SolrInputDocument doc = new SolrInputDocument();
     for (String field : tuple.getFields().keySet()) {
 
-      if (! (field.equals(CommonParams.VERSION_FIELD) && pruneVersionField)) {
+      if (!(field.equals(CommonParams.VERSION_FIELD) && pruneVersionField)) {
         Object value = tuple.get(field);
         if (value instanceof List) {
-          addMultivaluedField(doc, field, (List<?>)value);
+          addMultivaluedField(doc, field, (List<?>) value);
         } else {
           doc.addField(field, value);
         }
       }
     }
     log.debug("Tuple [{}] was converted into SolrInputDocument [{}].", tuple, doc);
-    
+
     return doc;
   }
-  
+
   private void addMultivaluedField(SolrInputDocument doc, String fieldName, List<?> values) {
     for (Object value : values) {
       doc.addField(fieldName, value);
     }
   }
-  
+
   /**
-   * This method will be called on every batch of tuples comsumed, after converting each tuple 
-   * in that batch to a Solr Input Document.
+   * This method will be called on every batch of tuples comsumed, after converting each tuple in
+   * that batch to a Solr Input Document.
    */
   protected void uploadBatchToCollection(List<SolrInputDocument> documentBatch) throws IOException {
     if (documentBatch.size() == 0) {
       return;
     }
-    
+
     try {
       cloudSolrClient.add(collection, documentBatch);
     } catch (SolrServerException | IOException e) {
       // TODO: it would be nice if there was an option to "skipFailedBatches"
-      // TODO: and just record the batch failure info in the summary tuple for that batch and continue
+      // TODO: and just record the batch failure info in the summary tuple for that batch and
+      // continue
       //
-      // TODO: The summary batches (and/or stream error) should also pay attention to the error metadata
+      // TODO: The summary batches (and/or stream error) should also pay attention to the error
+      // metadata

Review comment:
       tighten up.

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/ParallelMetricsRollup.java
##########
@@ -121,7 +130,8 @@
         if (count != null) {
           nextRollup = new WeightedSumMetric(next.getIdentifier(), count.getIdentifier());
         } else {
-          return Optional.empty(); // can't properly rollup mean metrics w/o a count (reqd by WeightedSumMetric)
+          return Optional.empty(); // can't properly rollup mean metrics w/o a count (reqd by

Review comment:
       awkward breakup

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
##########
@@ -720,19 +749,21 @@ protected RouteException getRouteException(SolrException.ErrorCode serverError,
     NamedList<Object> cheader = new NamedList<>();
     cheader.add("status", status);
     cheader.add("QTime", timeMillis);
-    if (rf != null)
-      cheader.add(UpdateRequest.REPFACT, rf);
+    if (rf != null) cheader.add(UpdateRequest.REPFACT, rf);
     if (null != toleratedErrors) {
       cheader.add("maxErrors", ToleratedUpdateError.getUserFriendlyMaxErrors(maxToleratedErrors));
       cheader.add("errors", toleratedErrors);
       if (maxToleratedErrors < toleratedErrors.size()) {
         // cumulative errors are too high, we need to throw a client exception w/correct metadata
 
-        // NOTE: it shouldn't be possible for 1 == toleratedErrors.size(), because if that were the case
+        // NOTE: it shouldn't be possible for 1 == toleratedErrors.size(), because if that were the
+        // case

Review comment:
       Tighten up?

##########
File path: solr/solrj/src/java/org/apache/solr/common/MapWriter.java
##########
@@ -17,63 +17,64 @@
 
 package org.apache.solr.common;
 
-
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.function.BiConsumer;
 import java.util.function.BiPredicate;
-
 import org.apache.solr.common.util.Utils;
 
 /**
- * Use this class to push all entries of a Map into an output.
- * This avoids creating map instances and is supposed to be memory efficient.
- * If the entries are primitives, unnecessary boxing is also avoided.
+ * Use this class to push all entries of a Map into an output. This avoids creating map instances
+ * and is supposed to be memory efficient. If the entries are primitives, unnecessary boxing is also
+ * avoided.
  */
-public interface MapWriter extends MapSerializable , NavigableObject {
+public interface MapWriter extends MapSerializable, NavigableObject {
 
-  default String jsonStr(){
+  default String jsonStr() {
     return Utils.toJSONString(this);
   }
 
   @Override
   @SuppressWarnings({"unchecked", "rawtypes"})
-  default Map<String,Object> toMap(Map<String, Object> map) {
+  default Map<String, Object> toMap(Map<String, Object> map) {
     try {
-      writeMap(new EntryWriter() {
-        @Override
-        public EntryWriter put(CharSequence k, Object v) {
-          if (v instanceof MapWriter) v = ((MapWriter) v).toMap(new LinkedHashMap<>());
-          if (v instanceof IteratorWriter) v = ((IteratorWriter) v).toList(new ArrayList<>());
-          if (v instanceof Iterable) {
-            List lst = new ArrayList();
-            for (Object vv : (Iterable)v) {
-              if (vv instanceof MapWriter) vv = ((MapWriter) vv).toMap(new LinkedHashMap<>());
-              if (vv instanceof IteratorWriter) vv = ((IteratorWriter) vv).toList(new ArrayList<>());
-              lst.add(vv);
-            }
-            v = lst;
-          }
-          if (v instanceof Map) {
-            Map map = new LinkedHashMap();
-            for (Map.Entry<?, ?> entry : ((Map<?, ?>)v).entrySet()) {
-              Object vv = entry.getValue();
-              if (vv instanceof MapWriter) vv = ((MapWriter) vv).toMap(new LinkedHashMap<>());
-              if (vv instanceof IteratorWriter) vv = ((IteratorWriter) vv).toList(new ArrayList<>());
-              map.put(entry.getKey(), vv);
+      writeMap(
+          new EntryWriter() {
+            @Override
+            public EntryWriter put(CharSequence k, Object v) {
+              if (v instanceof MapWriter) v = ((MapWriter) v).toMap(new LinkedHashMap<>());
+              if (v instanceof IteratorWriter) v = ((IteratorWriter) v).toList(new ArrayList<>());
+              if (v instanceof Iterable) {
+                List lst = new ArrayList();
+                for (Object vv : (Iterable) v) {
+                  if (vv instanceof MapWriter) vv = ((MapWriter) vv).toMap(new LinkedHashMap<>());
+                  if (vv instanceof IteratorWriter)
+                    vv = ((IteratorWriter) vv).toList(new ArrayList<>());
+                  lst.add(vv);
+                }
+                v = lst;
+              }
+              if (v instanceof Map) {
+                Map map = new LinkedHashMap();
+                for (Map.Entry<?, ?> entry : ((Map<?, ?>) v).entrySet()) {
+                  Object vv = entry.getValue();
+                  if (vv instanceof MapWriter) vv = ((MapWriter) vv).toMap(new LinkedHashMap<>());
+                  if (vv instanceof IteratorWriter)
+                    vv = ((IteratorWriter) vv).toList(new ArrayList<>());
+                  map.put(entry.getKey(), vv);
+                }
+                v = map;
+              }
+              map.put(k == null ? null : k.toString(), v);
+              // note: It'd be nice to assert that there is no previous value at 'k' but it's
+              // possible the passed in

Review comment:
       awkward breakup

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
##########
@@ -225,13 +225,15 @@ void sendUpdateStream() throws Exception {
             }
 
             InputStreamResponseListener responseListener = null;
-            try (Http2SolrClient.OutStream out = client.initOutStream(basePath, update.getRequest(),
-                update.getCollection())) {
+            try (Http2SolrClient.OutStream out =
+                client.initOutStream(basePath, update.getRequest(), update.getCollection())) {
               Update upd = update;
               while (upd != null) {
                 UpdateRequest req = upd.getRequest();
                 if (!out.belongToThisStream(req, upd.getCollection())) {
-                  queue.add(upd); // Request has different params or destination core/collection, return to queue
+                  queue.add(
+                      upd); // Request has different params or destination core/collection, return

Review comment:
       move comment up rather than break it

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/response/AnalysisResponseBase.java
##########
@@ -122,15 +122,16 @@ protected TokenInfo buildTokenInfo(NamedList<?> tokenNL) {
     int end = (Integer) tokenNL.get("end");
     int position = (Integer) tokenNL.get("position");
     Boolean match = (Boolean) tokenNL.get("match");
-    return new TokenInfo(text, rawText, type, start, end, position, (match == null ? false : match));
+    return new TokenInfo(
+        text, rawText, type, start, end, position, (match == null ? false : match));
   }
 
-
-  //================================================= Inner Classes ==================================================
+  // ================================================= Inner Classes

Review comment:
       don't break

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/RecursiveEvaluator.java
##########
@@ -41,160 +40,151 @@
 public abstract class RecursiveEvaluator implements StreamEvaluator, ValueWorker {
   protected static final long serialVersionUID = 1L;
   protected StreamContext streamContext;
-  
+
   protected UUID nodeId = UUID.randomUUID();
-  
+
   protected StreamFactory constructingFactory;
-  
+
   protected List<StreamEvaluator> containedEvaluators = new ArrayList<StreamEvaluator>();
-  
-  public RecursiveEvaluator(StreamExpression expression, StreamFactory factory) throws IOException{
+
+  public RecursiveEvaluator(StreamExpression expression, StreamFactory factory) throws IOException {
     this(expression, factory, new ArrayList<>());
   }
-  
-  protected Object normalizeInputType(Object value){
-    if(null == value){
+
+  protected Object normalizeInputType(Object value) {
+    if (null == value) {
       return null;
     } else if (value instanceof VectorFunction) {
       return value;
-    }
-    else if(value instanceof Double){
-      if(Double.isNaN((Double)value)){
+    } else if (value instanceof Double) {
+      if (Double.isNaN((Double) value)) {
         return null;
       }
       return new BigDecimal(value.toString());
-    }
-    else if(value instanceof BigDecimal){
-      return (BigDecimal)value;
-    }
-    else if(value instanceof Number){
+    } else if (value instanceof BigDecimal) {
+      return (BigDecimal) value;
+    } else if (value instanceof Number) {
       return new BigDecimal(value.toString());
-    }
-    else if(value instanceof Collection){
-      //Let's first check to see if we have a List of Strings.
-      //If we do let's try and convert to a list of doubles and see what happens
+    } else if (value instanceof Collection) {
+      // Let's first check to see if we have a List of Strings.
+      // If we do let's try and convert to a list of doubles and see what happens
       try {
         List<Number> vector = new ArrayList<>();
         boolean allDoubles = true;
-        for(Object o : (Collection)value) {
-          if(o instanceof String) {
+        for (Object o : (Collection) value) {
+          if (o instanceof String) {
             Double d = Double.parseDouble(o.toString());
             vector.add(d);
           } else {
             allDoubles = false;
             break;
           }
         }
-        if(allDoubles) {
+        if (allDoubles) {
           return vector;
         }
-      } catch(Exception e) {
+      } catch (Exception e) {
 
       }
 
-      return ((Collection<?>)value).stream().map(innerValue -> normalizeInputType(innerValue)).collect(Collectors.toList());
-    }
-    else if(value.getClass().isArray()){
+      return ((Collection<?>) value)
+          .stream().map(innerValue -> normalizeInputType(innerValue)).collect(Collectors.toList());
+    } else if (value.getClass().isArray()) {
       Stream<?> stream = Stream.empty();
-      if(value instanceof double[]){
-        stream = Arrays.stream((double[])value).boxed();
-      }
-      else if(value instanceof int[]){
-        stream = Arrays.stream((int[])value).boxed();
-      }
-      else if(value instanceof long[]){
-        stream = Arrays.stream((long[])value).boxed();
+      if (value instanceof double[]) {
+        stream = Arrays.stream((double[]) value).boxed();
+      } else if (value instanceof int[]) {
+        stream = Arrays.stream((int[]) value).boxed();
+      } else if (value instanceof long[]) {
+        stream = Arrays.stream((long[]) value).boxed();
+      } else if (value instanceof String[]) {
+        stream = Arrays.stream((String[]) value);
       }
-      else if(value instanceof String[]){
-        stream = Arrays.stream((String[])value);
-      }      
       return stream.map(innerValue -> normalizeInputType(innerValue)).collect(Collectors.toList());
-    }
-    else{
+    } else {
       // anything else can just be returned as is
       return value;
     }
-
   }
-  
+
   protected Object normalizeOutputType(Object value) {
-    if(null == value){
+    if (null == value) {
       return null;
     } else if (value instanceof VectorFunction) {
       return value;
-    } else if(value instanceof BigDecimal){
-      BigDecimal bd = (BigDecimal)value;
+    } else if (value instanceof BigDecimal) {
+      BigDecimal bd = (BigDecimal) value;
       return bd.doubleValue();
-    }
-    else if(value instanceof Long || value instanceof Integer) {
+    } else if (value instanceof Long || value instanceof Integer) {
       return ((Number) value).longValue();
-    }
-    else if(value instanceof Double){
+    } else if (value instanceof Double) {
       return value;
-    }
-    else if(value instanceof Number){
+    } else if (value instanceof Number) {
       return ((Number) value).doubleValue();
-    }
-    else if(value instanceof List){
+    } else if (value instanceof List) {
       // normalize each value in the list
-      return ((List<?>)value).stream().map(innerValue -> normalizeOutputType(innerValue)).collect(Collectors.toList());
-    } else if(value instanceof Tuple && value.getClass().getEnclosingClass() == null) {
-      //If its a tuple and not a inner class that has extended tuple, which is done in a number of cases so that mathematical models
-      //can be contained within a tuple.
+      return ((List<?>) value)
+          .stream().map(innerValue -> normalizeOutputType(innerValue)).collect(Collectors.toList());
+    } else if (value instanceof Tuple && value.getClass().getEnclosingClass() == null) {
+      // If its a tuple and not a inner class that has extended tuple, which is done in a number of
+      // cases so that mathematical models

Review comment:
       awkward break

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/RejoinLeaderElectionPayload.java
##########
@@ -22,23 +22,18 @@
 
 public class RejoinLeaderElectionPayload implements ReflectMapWriter {
 
-    // TODO It seems like most of these properties should be required, but it's hard to tell which ones are meant to be
-    //  required without that being specified on the v1 API or elsewhere
-    @JsonProperty
-    public String collection;
+  // TODO It seems like most of these properties should be required, but it's hard to tell which
+  // ones are meant to be
+  //  required without that being specified on the v1 API or elsewhere

Review comment:
       awkward break

##########
File path: solr/solrj/src/test/org/apache/solr/client/solrj/TestSolrJErrorHandling.java
##########
@@ -129,43 +128,49 @@ public boolean hasNext() {
       @Override
       public SolrInputDocument next() {
         int id = base + count++;
-        if (count == 1) {  // first doc is legit, and will increment a counter
-          return sdoc("id","test", "count_i", map("inc",1));
+        if (count == 1) { // first doc is legit, and will increment a counter
+          return sdoc("id", "test", "count_i", map("inc", 1));
         }
-        // include "ignore_exception" so the log doesn't fill up with known exceptions, and change the values for each doc
+        // include "ignore_exception" so the log doesn't fill up with known exceptions, and change
+        // the values for each doc
         // so binary format won't compress too much
-        return sdoc("id",Integer.toString(id),"ignore_exception_field_does_not_exist_"+id,"fieldval"+id);
+        return sdoc(

Review comment:
       tighten up

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/FacetStream.java
##########
@@ -407,142 +482,172 @@ public String getCollection() {
       }
     }
 
-    if(buff.length() > 0) {
+    if (buff.length() > 0) {
       sorts.add(buff.toString());
     }
 
     return sorts.toArray(new String[sorts.size()]);
   }
 
-
-  private void init(String collection, SolrParams params, Bucket[] buckets, FieldComparator[] bucketSorts, Metric[] metrics, int rows, int offset, int bucketSizeLimit, boolean refine, String method, boolean serializeBucketSizeLimit, int overfetch, String zkHost) throws IOException {
-    this.zkHost  = zkHost;
+  private void init(
+      String collection,
+      SolrParams params,
+      Bucket[] buckets,
+      FieldComparator[] bucketSorts,
+      Metric[] metrics,
+      int rows,
+      int offset,
+      int bucketSizeLimit,
+      boolean refine,
+      String method,
+      boolean serializeBucketSizeLimit,
+      int overfetch,
+      String zkHost)
+      throws IOException {
+    this.zkHost = zkHost;
     this.params = new ModifiableSolrParams(params);
     this.buckets = buckets;
     this.metrics = metrics;
     this.rows = rows;
     this.offset = offset;
     this.refine = refine;
-    this.bucketSizeLimit   = bucketSizeLimit;
+    this.bucketSizeLimit = bucketSizeLimit;
     this.collection = collection;
     this.bucketSorts = bucketSorts;
     this.method = method;
     this.serializeBucketSizeLimit = serializeBucketSizeLimit;
     this.overfetch = overfetch;
-    
+
     // In a facet world it only makes sense to have the same field name in all of the sorters
     // Because FieldComparator allows for left and right field names we will need to validate
     // that they are the same
-    for(FieldComparator sort : bucketSorts){
-      if(sort.hasDifferentFieldNames()){
-        throw new IOException("Invalid FacetStream - all sorts must be constructed with a single field name.");
+    for (FieldComparator sort : bucketSorts) {
+      if (sort.hasDifferentFieldNames()) {
+        throw new IOException(
+            "Invalid FacetStream - all sorts must be constructed with a single field name.");
       }
     }
   }
-  
+
   @Override
-  public StreamExpressionParameter toExpression(StreamFactory factory) throws IOException {    
+  public StreamExpressionParameter toExpression(StreamFactory factory) throws IOException {
     // function name
     StreamExpression expression = new StreamExpression(factory.getFunctionName(this.getClass()));
-    
+
     // collection
-    if(collection.indexOf(',') > -1) {
-      expression.addParameter("\""+collection+"\"");
+    if (collection.indexOf(',') > -1) {
+      expression.addParameter("\"" + collection + "\"");
     } else {
       expression.addParameter(collection);
     }
-    
+
     // parameters
 
     for (Entry<String, String[]> param : params.getMap().entrySet()) {
       for (String val : param.getValue()) {
         expression.addParameter(new StreamExpressionNamedParameter(param.getKey(), val));
       }
     }
-    
+
     // buckets
     {
       StringBuilder builder = new StringBuilder();
-      for(Bucket bucket : buckets){
-        if(0 != builder.length()){ builder.append(","); }
+      for (Bucket bucket : buckets) {
+        if (0 != builder.length()) {
+          builder.append(",");
+        }
         builder.append(bucket.toString());
       }
       expression.addParameter(new StreamExpressionNamedParameter("buckets", builder.toString()));
     }
-    
+
     // bucketSorts
     {
       StringBuilder builder = new StringBuilder();
-      for(FieldComparator sort : bucketSorts){
-        if(0 != builder.length()){ builder.append(","); }
+      for (FieldComparator sort : bucketSorts) {
+        if (0 != builder.length()) {
+          builder.append(",");
+        }
         builder.append(sort.toExpression(factory));
       }
-      expression.addParameter(new StreamExpressionNamedParameter("bucketSorts", builder.toString()));
+      expression.addParameter(
+          new StreamExpressionNamedParameter("bucketSorts", builder.toString()));
     }
-    
+
     // metrics
-    for(Metric metric : metrics){
+    for (Metric metric : metrics) {
       expression.addParameter(metric.toExpression(factory));
     }
-    
-    if(serializeBucketSizeLimit) {
-      if(bucketSizeLimit == Integer.MAX_VALUE) {
-        expression.addParameter(new StreamExpressionNamedParameter("bucketSizeLimit", Integer.toString(-1)));
+
+    if (serializeBucketSizeLimit) {
+      if (bucketSizeLimit == Integer.MAX_VALUE) {
+        expression.addParameter(
+            new StreamExpressionNamedParameter("bucketSizeLimit", Integer.toString(-1)));
       } else {
-        expression.addParameter(new StreamExpressionNamedParameter("bucketSizeLimit", Integer.toString(bucketSizeLimit)));
+        expression.addParameter(
+            new StreamExpressionNamedParameter(
+                "bucketSizeLimit", Integer.toString(bucketSizeLimit)));
       }
     } else {
       if (rows == Integer.MAX_VALUE) {
         expression.addParameter(new StreamExpressionNamedParameter("rows", Integer.toString(-1)));
-      } else{
+      } else {
         expression.addParameter(new StreamExpressionNamedParameter("rows", Integer.toString(rows)));
       }
 
-      expression.addParameter(new StreamExpressionNamedParameter("offset", Integer.toString(offset)));
+      expression.addParameter(
+          new StreamExpressionNamedParameter("offset", Integer.toString(offset)));
 
-      if(overfetch == Integer.MAX_VALUE) {
-        expression.addParameter(new StreamExpressionNamedParameter("overfetch", Integer.toString(-1)));
+      if (overfetch == Integer.MAX_VALUE) {
+        expression.addParameter(
+            new StreamExpressionNamedParameter("overfetch", Integer.toString(-1)));
       } else {
-        expression.addParameter(new StreamExpressionNamedParameter("overfetch", Integer.toString(overfetch)));
+        expression.addParameter(
+            new StreamExpressionNamedParameter("overfetch", Integer.toString(overfetch)));
       }
     }
 
-    if(method != null) {
+    if (method != null) {
       expression.addParameter(new StreamExpressionNamedParameter("method", this.method));
     }
-        
+
     // zkHost
     expression.addParameter(new StreamExpressionNamedParameter("zkHost", zkHost));
-        
-    return expression;   
+
+    return expression;
   }
 
   @Override
   public Explanation toExplanation(StreamFactory factory) throws IOException {
 
     StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
-    
+
     explanation.setFunctionName(factory.getFunctionName(this.getClass()));
     explanation.setImplementingClass(this.getClass().getName());
     explanation.setExpressionType(ExpressionType.STREAM_SOURCE);
     explanation.setExpression(toExpression(factory).toString());
-    
+
     // child is a datastore so add it at this point
     StreamExplanation child = new StreamExplanation(getStreamNodeId() + "-datastore");
-    child.setFunctionName(String.format(Locale.ROOT, "solr (%s)", collection)); 
-    // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be in a
+    child.setFunctionName(String.format(Locale.ROOT, "solr (%s)", collection));
+    // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be in
+    // a

Review comment:
       tighten up

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/FeaturesSelectionStream.java
##########
@@ -238,7 +262,8 @@ public void setStreamContext(StreamContext context) {
   /**
    * Opens the CloudSolrStream
    *
-   ***/
+   * <p>*

Review comment:
       remove <p>

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
##########
@@ -294,13 +319,18 @@ public Explanation toExplanation(StreamFactory factory) throws IOException {
     // child is a datastore so add it at this point
     StreamExplanation child = new StreamExplanation(getStreamNodeId() + "-datastore");
     child.setFunctionName(String.format(Locale.ROOT, "solr (%s)", collection));
-    // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be in a
+    // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be in
+    // a

Review comment:
       tighten

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SearchFacadeStream.java
##########
@@ -120,7 +121,8 @@ public void setStreamContext(StreamContext context) {
   /**
    * Opens the CloudSolrStream
    *
-   ***/
+   * <p>*

Review comment:
       tighten up

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/StatsStream.java
##########
@@ -222,18 +226,21 @@ public void setStreamContext(StreamContext context) {
   public void open() throws IOException {
 
     @SuppressWarnings({"unchecked"})
-    Map<String, List<String>> shardsMap = (Map<String, List<String>>)context.get("shards");
+    Map<String, List<String>> shardsMap = (Map<String, List<String>>) context.get("shards");
 
     // Parallelize the stats stream across multiple collections for an alias using plist if possible
     if (shardsMap == null && params.getBool(TIERED_PARAM, defaultTieredEnabled)) {
-      ClusterStateProvider clusterStateProvider = cache.getCloudSolrClient(zkHost).getClusterStateProvider();
-      final List<String> resolved = clusterStateProvider != null ? clusterStateProvider.resolveAlias(collection) : null;
+      ClusterStateProvider clusterStateProvider =
+          cache.getCloudSolrClient(zkHost).getClusterStateProvider();
+      final List<String> resolved =
+          clusterStateProvider != null ? clusterStateProvider.resolveAlias(collection) : null;
       if (resolved != null && resolved.size() > 1) {
         Optional<TupleStream> maybeParallelize = openParallelStream(context, resolved, metrics);
         if (maybeParallelize.isPresent()) {
           this.parallelizedStream = maybeParallelize.get();
           return; // we're using a plist to parallelize the facet operation
-        } // else, there's a metric that we can't rollup over the plist results safely ... no plist for you!
+        } // else, there's a metric that we can't rollup over the plist results safely ... no plist
+        // for you!

Review comment:
       awkward

##########
File path: solr/solrj/src/java/org/noggit/JSONParser.java
##########
@@ -414,7 +398,8 @@ protected boolean matchBareWord(char[] arr) throws IOException {
       }
     }
 
-    // if we don't allow bare strings, we don't need to check that the string actually terminates... just
+    // if we don't allow bare strings, we don't need to check that the string actually terminates...

Review comment:
       awkward comment split

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/FacetStream.java
##########
@@ -553,87 +658,98 @@ public void setStreamContext(StreamContext context) {
   }
 
   public void open() throws IOException {
-    if(cache != null) {
+    if (cache != null) {
       cloudSolrClient = cache.getCloudSolrClient(zkHost);
     } else {
       final List<String> hosts = new ArrayList<>();
       hosts.add(zkHost);
-      cloudSolrClient = new Builder(hosts, Optional.empty()).withSocketTimeout(30000).withConnectionTimeout(15000).build();
+      cloudSolrClient =
+          new Builder(hosts, Optional.empty())
+              .withSocketTimeout(30000)
+              .withConnectionTimeout(15000)
+              .build();
     }
 
-    // Parallelize the facet expression across multiple collections for an alias using plist if possible
+    // Parallelize the facet expression across multiple collections for an alias using plist if
+    // possible
     if (params.getBool(TIERED_PARAM, defaultTieredEnabled)) {
       ClusterStateProvider clusterStateProvider = cloudSolrClient.getClusterStateProvider();
-      final List<String> resolved = clusterStateProvider != null ? clusterStateProvider.resolveAlias(collection) : null;
+      final List<String> resolved =
+          clusterStateProvider != null ? clusterStateProvider.resolveAlias(collection) : null;
       if (resolved != null && resolved.size() > 1) {
         Optional<TupleStream> maybeParallelize = openParallelStream(context, resolved, metrics);
         if (maybeParallelize.isPresent()) {
           this.parallelizedStream = maybeParallelize.get();
           return; // we're using a plist to parallelize the facet operation
-        } // else, there's a metric that we can't rollup over the plist results safely ... no plist for you!
+        } // else, there's a metric that we can't rollup over the plist results safely ... no plist

Review comment:
       reword or somehow not break

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
##########
@@ -412,73 +412,74 @@ public void waitForState(String collection, long wait, TimeUnit unit, Predicate<
    * Register a CollectionStateWatcher to be called when the cluster state for a collection changes
    * <em>or</em> the set of live nodes changes.
    *
-   * <p>
-   * The Watcher will automatically be removed when it's 
-   * <code>onStateChanged</code> returns <code>true</code>
-   * </p>
+   * <p>The Watcher will automatically be removed when it's <code>onStateChanged</code> returns
+   * <code>true</code>
    *
-   * <p>
-   * This implementation utilizes {@link ZkStateReader#registerCollectionStateWatcher} internally.
-   * Callers that don't care about liveNodes are encouraged to use a {@link DocCollectionWatcher} 
-   * instead
-   * </p>
+   * <p>This implementation utilizes {@link ZkStateReader#registerCollectionStateWatcher}
+   * internally. Callers that don't care about liveNodes are encouraged to use a {@link
+   * DocCollectionWatcher} instead
    *
    * @see #registerDocCollectionWatcher(String, DocCollectionWatcher)
    * @see ZkStateReader#registerCollectionStateWatcher
    * @param collection the collection to watch
-   * @param watcher    a watcher that will be called when the state changes
+   * @param watcher a watcher that will be called when the state changes
    */
   public void registerCollectionStateWatcher(String collection, CollectionStateWatcher watcher) {
     getClusterStateProvider().connect();
     assertZKStateProvider().zkStateReader.registerCollectionStateWatcher(collection, watcher);
   }
-  
+
   /**
    * Register a DocCollectionWatcher to be called when the cluster state for a collection changes.
    *
-   * <p>
-   * The Watcher will automatically be removed when it's 
-   * <code>onStateChanged</code> returns <code>true</code>
-   * </p>
+   * <p>The Watcher will automatically be removed when it's <code>onStateChanged</code> returns
+   * <code>true</code>
    *
    * @see ZkStateReader#registerDocCollectionWatcher
    * @param collection the collection to watch
-   * @param watcher    a watcher that will be called when the state changes
+   * @param watcher a watcher that will be called when the state changes
    */
   public void registerDocCollectionWatcher(String collection, DocCollectionWatcher watcher) {
     getClusterStateProvider().connect();
     assertZKStateProvider().zkStateReader.registerDocCollectionWatcher(collection, watcher);
   }
 
   @SuppressWarnings({"unchecked"})
-  private NamedList<Object> directUpdate(AbstractUpdateRequest request, String collection) throws SolrServerException {
+  private NamedList<Object> directUpdate(AbstractUpdateRequest request, String collection)
+      throws SolrServerException {
     UpdateRequest updateRequest = (UpdateRequest) request;
     SolrParams params = request.getParams();
     ModifiableSolrParams routableParams = new ModifiableSolrParams();
     ModifiableSolrParams nonRoutableParams = new ModifiableSolrParams();
 
-    if(params != null) {
+    if (params != null) {
       nonRoutableParams.add(params);
       routableParams.add(params);
-      for(String param : NON_ROUTABLE_PARAMS) {
+      for (String param : NON_ROUTABLE_PARAMS) {
         routableParams.remove(param);
       }
     } else {
       params = new ModifiableSolrParams();
     }
 
     if (collection == null) {
-      throw new SolrServerException("No collection param specified on request and no default collection has been set.");
+      throw new SolrServerException(
+          "No collection param specified on request and no default collection has been set.");
     }
 
-    //Check to see if the collection is an alias. Updates to multi-collection aliases are ok as long
+    // Check to see if the collection is an alias. Updates to multi-collection aliases are ok as

Review comment:
       tighten

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JDBCStream.java
##########
@@ -455,78 +543,88 @@ public String getColumnName() {
       final int scale = metadata.getScale(columnNumber);
       if (Number.class.isAssignableFrom(clazz)) {
         if (scale > 0) {
-          valueSelector = new ResultSetValueSelector() {
-            @Override
-            public Object selectValue(ResultSet resultSet) throws SQLException {
-              BigDecimal bd = resultSet.getBigDecimal(columnNumber);
-              return resultSet.wasNull() ? null : bd.doubleValue();                
-            }
-            @Override
-            public String getColumnName() {
-              return columnName;
-            }
-          };            
+          valueSelector =
+              new ResultSetValueSelector() {
+                @Override
+                public Object selectValue(ResultSet resultSet) throws SQLException {
+                  BigDecimal bd = resultSet.getBigDecimal(columnNumber);
+                  return resultSet.wasNull() ? null : bd.doubleValue();
+                }
+
+                @Override
+                public String getColumnName() {
+                  return columnName;
+                }
+              };
         } else {
-          valueSelector = new ResultSetValueSelector() {
-            @Override
-            public Object selectValue(ResultSet resultSet) throws SQLException {
-              BigDecimal bd = resultSet.getBigDecimal(columnNumber);
-              return resultSet.wasNull() ? null : bd.longValue();
-            }
-            @Override
-            public String getColumnName() {
-              return columnName;
-            }
-          };            
-        }          
+          valueSelector =
+              new ResultSetValueSelector() {
+                @Override
+                public Object selectValue(ResultSet resultSet) throws SQLException {
+                  BigDecimal bd = resultSet.getBigDecimal(columnNumber);
+                  return resultSet.wasNull() ? null : bd.longValue();
+                }
+
+                @Override
+                public String getColumnName() {
+                  return columnName;
+                }
+              };
+        }
       } else if (Clob.class.isAssignableFrom(clazz)) {
-        valueSelector = new ResultSetValueSelector() {
-          @Override
-          public Object selectValue(ResultSet resultSet) throws SQLException {
-            Clob c = resultSet.getClob(columnNumber);
-            if (resultSet.wasNull()) {
-              return null;
-            }
-            long length = c.length();
-            int lengthInt = (int) length;
-            if (length != lengthInt) {
-              throw new SQLException(String.format(Locale.ROOT,
-                  "Encountered a clob of length #%l in column '%s' (col #%d).  Max supported length is #%i.",
-                  length, columnName, columnNumber, Integer.MAX_VALUE));
-            }
-            return c.getSubString(1, lengthInt);
-          }
-          @Override
-          public String getColumnName() {
-            return columnName;
-          }
-        };
-      } 
+        valueSelector =
+            new ResultSetValueSelector() {
+              @Override
+              public Object selectValue(ResultSet resultSet) throws SQLException {
+                Clob c = resultSet.getClob(columnNumber);
+                if (resultSet.wasNull()) {
+                  return null;
+                }
+                long length = c.length();
+                int lengthInt = (int) length;
+                if (length != lengthInt) {
+                  throw new SQLException(
+                      String.format(
+                          Locale.ROOT,
+                          "Encountered a clob of length #%l in column '%s' (col #%d).  Max supported length is #%i.",
+                          length,
+                          columnName,
+                          columnNumber,
+                          Integer.MAX_VALUE));
+                }
+                return c.getSubString(1, lengthInt);
+              }
+
+              @Override
+              public String getColumnName() {
+                return columnName;
+              }
+            };
+      }
     }
     return valueSelector;
   }
-  
-  /**
-   *  Closes the JDBCStream
-   **/
+
+  /** Closes the JDBCStream */
   public void close() throws IOException {
-    try{
-      if(null != resultSet){ // it's not required in JDBC that ResultSet implements the isClosed() function
+    try {
+      if (null != resultSet) { // it's not required in JDBC that ResultSet implements the isClosed()

Review comment:
       awkward comment split

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/StatsStream.java
##########
@@ -197,13 +196,18 @@ public Explanation toExplanation(StreamFactory factory) throws IOException {
     // child is a datastore so add it at this point
     StreamExplanation child = new StreamExplanation(getStreamNodeId() + "-datastore");
     child.setFunctionName(String.format(Locale.ROOT, "solr (%s)", collection));
-    // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be in a
+    // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be in
+    // a

Review comment:
       tighten this up?

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JDBCStream.java
##########
@@ -130,320 +127,411 @@
   // types will require some level of conversion (short -> long, etc...)
   // We'll use a static constructor to load this set.
   private static final HashSet<String> directSupportedTypes = new HashSet<>();
+
   static {
-      directSupportedTypes.add(String.class.getName()); 
-      directSupportedTypes.add(Double.class.getName()); 
-      directSupportedTypes.add(Long.class.getName()); 
-      directSupportedTypes.add(Boolean.class.getName());
+    directSupportedTypes.add(String.class.getName());
+    directSupportedTypes.add(Double.class.getName());
+    directSupportedTypes.add(Long.class.getName());
+    directSupportedTypes.add(Boolean.class.getName());
   }
-  
+
   // Provided as input
   private String driverClassName;
   private String connectionUrl;
   private String sqlQuery;
   private StreamComparator definedSort;
   private int fetchSize;
-  
+
   // Internal
   private Connection connection;
   private Properties connectionProperties;
   private Statement statement;
   private ResultSetValueSelector[] valueSelectors;
   protected ResultSet resultSet;
   protected transient StreamContext streamContext;
-  protected String sep = Character.toString((char)31);
+  protected String sep = Character.toString((char) 31);
 
-  public JDBCStream(String connectionUrl, String sqlQuery, StreamComparator definedSort) throws IOException {
+  public JDBCStream(String connectionUrl, String sqlQuery, StreamComparator definedSort)
+      throws IOException {
     this(connectionUrl, sqlQuery, definedSort, null, null);
   }
-  
-  public JDBCStream(String connectionUrl, String sqlQuery, StreamComparator definedSort, Properties connectionProperties, String driverClassName) throws IOException {
+
+  public JDBCStream(
+      String connectionUrl,
+      String sqlQuery,
+      StreamComparator definedSort,
+      Properties connectionProperties,
+      String driverClassName)
+      throws IOException {
     init(connectionUrl, sqlQuery, definedSort, connectionProperties, driverClassName, 5000);
   }
-  
-  public JDBCStream(StreamExpression expression, StreamFactory factory) throws IOException{
+
+  public JDBCStream(StreamExpression expression, StreamFactory factory) throws IOException {
     // grab all parameters out
     List<StreamExpressionNamedParameter> namedParams = factory.getNamedOperands(expression);
-    StreamExpressionNamedParameter connectionUrlExpression = factory.getNamedOperand(expression, "connection");
+    StreamExpressionNamedParameter connectionUrlExpression =
+        factory.getNamedOperand(expression, "connection");
     StreamExpressionNamedParameter sqlQueryExpression = factory.getNamedOperand(expression, "sql");
-    StreamExpressionNamedParameter definedSortExpression = factory.getNamedOperand(expression, SORT);
-    StreamExpressionNamedParameter driverClassNameExpression = factory.getNamedOperand(expression, "driver");
-    StreamExpressionNamedParameter fetchSizeExpression = factory.getNamedOperand(expression, "fetchSize");
-
+    StreamExpressionNamedParameter definedSortExpression =
+        factory.getNamedOperand(expression, SORT);
+    StreamExpressionNamedParameter driverClassNameExpression =
+        factory.getNamedOperand(expression, "driver");
+    StreamExpressionNamedParameter fetchSizeExpression =
+        factory.getNamedOperand(expression, "fetchSize");
 
-    // Validate there are no unknown parameters - zkHost and alias are namedParameter so we don't need to count it twice
-    if(expression.getParameters().size() != namedParams.size()){
-      throw new IOException(String.format(Locale.ROOT,"invalid expression %s - unknown operands found", expression));
+    // Validate there are no unknown parameters - zkHost and alias are namedParameter so we don't
+    // need to count it twice
+    if (expression.getParameters().size() != namedParams.size()) {
+      throw new IOException(
+          String.format(Locale.ROOT, "invalid expression %s - unknown operands found", expression));
     }
-           
+
     // All named params we don't care about will be passed to the driver on connection
     Properties connectionProperties = new Properties();
-    for(StreamExpressionNamedParameter namedParam : namedParams){
-      if(!namedParam.getName().equals("driver") && !namedParam.getName().equals("connection") && !namedParam.getName().equals("sql") && !namedParam.getName().equals(SORT)){
+    for (StreamExpressionNamedParameter namedParam : namedParams) {
+      if (!namedParam.getName().equals("driver")
+          && !namedParam.getName().equals("connection")
+          && !namedParam.getName().equals("sql")
+          && !namedParam.getName().equals(SORT)) {
         connectionProperties.put(namedParam.getName(), namedParam.getParameter().toString().trim());
       }
     }
 
     int fetchSize = 5000;
-    if(null != fetchSizeExpression && fetchSizeExpression.getParameter() instanceof StreamExpressionValue){
-      String fetchSizeString = ((StreamExpressionValue)fetchSizeExpression.getParameter()).getValue();
+    if (null != fetchSizeExpression
+        && fetchSizeExpression.getParameter() instanceof StreamExpressionValue) {
+      String fetchSizeString =
+          ((StreamExpressionValue) fetchSizeExpression.getParameter()).getValue();
       fetchSize = Integer.parseInt(fetchSizeString);
     }
 
     // connectionUrl, required
     String connectionUrl = null;
-    if(null != connectionUrlExpression && connectionUrlExpression.getParameter() instanceof StreamExpressionValue){
-      connectionUrl = ((StreamExpressionValue)connectionUrlExpression.getParameter()).getValue();
+    if (null != connectionUrlExpression
+        && connectionUrlExpression.getParameter() instanceof StreamExpressionValue) {
+      connectionUrl = ((StreamExpressionValue) connectionUrlExpression.getParameter()).getValue();
     }
-    if(null == connectionUrl){
-      throw new IOException(String.format(Locale.ROOT,"invalid expression %s - connection not found", connectionUrlExpression));
+    if (null == connectionUrl) {
+      throw new IOException(
+          String.format(
+              Locale.ROOT,
+              "invalid expression %s - connection not found",
+              connectionUrlExpression));
     }
-    
+
     // sql, required
     String sqlQuery = null;
-    if(null != sqlQueryExpression && sqlQueryExpression.getParameter() instanceof StreamExpressionValue){
-      sqlQuery = ((StreamExpressionValue)sqlQueryExpression.getParameter()).getValue();
+    if (null != sqlQueryExpression
+        && sqlQueryExpression.getParameter() instanceof StreamExpressionValue) {
+      sqlQuery = ((StreamExpressionValue) sqlQueryExpression.getParameter()).getValue();
     }
-    if(null == sqlQuery){
-      throw new IOException(String.format(Locale.ROOT,"invalid expression %s - sql not found", sqlQueryExpression));
+    if (null == sqlQuery) {
+      throw new IOException(
+          String.format(Locale.ROOT, "invalid expression %s - sql not found", sqlQueryExpression));
     }
-    
+
     // definedSort, required
     StreamComparator definedSort = null;
-    if(null != definedSortExpression && definedSortExpression.getParameter() instanceof StreamExpressionValue){
-      definedSort = factory.constructComparator(((StreamExpressionValue)definedSortExpression.getParameter()).getValue(), FieldComparator.class);
+    if (null != definedSortExpression
+        && definedSortExpression.getParameter() instanceof StreamExpressionValue) {
+      definedSort =
+          factory.constructComparator(
+              ((StreamExpressionValue) definedSortExpression.getParameter()).getValue(),
+              FieldComparator.class);
     }
-    if(null == definedSort){
-      throw new IOException(String.format(Locale.ROOT,"invalid expression %s - sort not found", definedSortExpression));
+    if (null == definedSort) {
+      throw new IOException(
+          String.format(
+              Locale.ROOT, "invalid expression %s - sort not found", definedSortExpression));
     }
-    
+
     // driverClass, optional
     String driverClass = null;
-    if(null != driverClassNameExpression && driverClassNameExpression.getParameter() instanceof StreamExpressionValue){
-      driverClass = ((StreamExpressionValue)driverClassNameExpression.getParameter()).getValue();
+    if (null != driverClassNameExpression
+        && driverClassNameExpression.getParameter() instanceof StreamExpressionValue) {
+      driverClass = ((StreamExpressionValue) driverClassNameExpression.getParameter()).getValue();
     }
 
     // We've got all the required items
     init(connectionUrl, sqlQuery, definedSort, connectionProperties, driverClass, fetchSize);
   }
-    
-  private void init(String connectionUrl, String sqlQuery, StreamComparator definedSort, Properties connectionProperties, String driverClassName, int fetchSize) {
+
+  private void init(
+      String connectionUrl,
+      String sqlQuery,
+      StreamComparator definedSort,
+      Properties connectionProperties,
+      String driverClassName,
+      int fetchSize) {
     this.connectionUrl = connectionUrl;
     this.sqlQuery = sqlQuery;
     this.definedSort = definedSort;
     this.connectionProperties = connectionProperties;
     this.driverClassName = driverClassName;
     this.fetchSize = fetchSize;
   }
-  
+
   public void setStreamContext(StreamContext context) {
     this.streamContext = context;
   }
 
   /**
-  * Opens the JDBCStream
-  *
-  ***/
+   * Opens the JDBCStream
+   *
+   * <p>*

Review comment:
       delete <p>

##########
File path: solr/solrj/src/java/org/apache/solr/common/ToleratedUpdateError.java
##########
@@ -16,122 +16,135 @@
  */
 package org.apache.solr.common;
 
+import static org.apache.solr.common.params.CommonParams.ID;
+
 import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.solr.common.SolrException.ErrorCode;
 import org.apache.solr.common.util.SimpleOrderedMap;
 
-import static org.apache.solr.common.params.CommonParams.ID;
-
 /**
- * Models the basic information related to a single "tolerated" error that occurred during updates.  
- * This class is only useful when the <code>TolerantUpdateProcessorFactory</code> is used in an update 
- * processor chain
+ * Models the basic information related to a single "tolerated" error that occurred during updates.
+ * This class is only useful when the <code>TolerantUpdateProcessorFactory</code> is used in an
+ * update processor chain
  */
 public final class ToleratedUpdateError {
-    
-  private final static String META_PRE =  ToleratedUpdateError.class.getName() + "--";
-  private final static int META_PRE_LEN = META_PRE.length();
+
+  private static final String META_PRE = ToleratedUpdateError.class.getName() + "--";
+  private static final int META_PRE_LEN = META_PRE.length();
 
   /**
-   * Given a 'maxErrors' value such that<code>-1 &lt;= maxErrors &lt;= {@link Integer#MAX_VALUE}</code> 
-   * this method returns the original input unless it is <code>-1</code> in which case the effective value of
-   * {@link Integer#MAX_VALUE}  is returned.
-   * Input of <code>maxErrors &lt; -1</code> will trip an assertion and otherwise have undefined behavior.
+   * Given a 'maxErrors' value such that<code>-1 &lt;= maxErrors &lt;= {@link Integer#MAX_VALUE}
+   * </code> this method returns the original input unless it is <code>-1</code> in which case the
+   * effective value of {@link Integer#MAX_VALUE} is returned. Input of <code>maxErrors &lt; -1
+   * </code> will trip an assertion and otherwise have undefined behavior.
+   *
    * @see #getUserFriendlyMaxErrors
    */
   public static int getEffectiveMaxErrors(int maxErrors) {
     assert -1 <= maxErrors;
     return -1 == maxErrors ? Integer.MAX_VALUE : maxErrors;
   }
-  
+
   /**
-   * Given a 'maxErrors' value such that<code>-1 &lt;= maxErrors &lt;= {@link Integer#MAX_VALUE}</code> 
-   * this method returns the original input unless it is {@link Integer#MAX_VALUE} in which case 
-   * <code>-1</code> is returned for user convinience.
-   * Input of <code>maxErrors &lt; -1</code> will trip an assertion and otherwise have undefined behavior.
+   * Given a 'maxErrors' value such that<code>-1 &lt;= maxErrors &lt;= {@link Integer#MAX_VALUE}
+   * </code> this method returns the original input unless it is {@link Integer#MAX_VALUE} in which
+   * case <code>-1</code> is returned for user convinience. Input of <code>maxErrors &lt; -1</code>
+   * will trip an assertion and otherwise have undefined behavior.
+   *
    * @see #getEffectiveMaxErrors
    */
   public static int getUserFriendlyMaxErrors(int maxErrors) {
     assert -1 <= maxErrors;
     return Integer.MAX_VALUE == maxErrors ? -1 : maxErrors;
   }
-  
-  /** 
-   * returns a list of maps of simple objects suitable for putting in a SolrQueryResponse header 
+
+  /**
+   * returns a list of maps of simple objects suitable for putting in a SolrQueryResponse header
+   *
    * @see #getSimpleMap
    * @see #parseMap
    */
-  public static List<SimpleOrderedMap<String>> formatForResponseHeader(List<ToleratedUpdateError> errs) {
+  public static List<SimpleOrderedMap<String>> formatForResponseHeader(
+      List<ToleratedUpdateError> errs) {
     List<SimpleOrderedMap<String>> result = new ArrayList<>(errs.size());
     for (ToleratedUpdateError e : errs) {
       result.add(e.getSimpleMap());
     }
     return result;
   }
-  
-  /** 
-   * returns a ToleratedUpdateError instance from the data in this Map 
+
+  /**
+   * returns a ToleratedUpdateError instance from the data in this Map
+   *
    * @see #getSimpleMap
    */
   public static ToleratedUpdateError parseMap(SimpleOrderedMap<String> data) {
     final String id = data.get(ID);
     final String message = data.get("message");
     final String t = data.get("type");
     if (null == t || null == id || null == message) {
-      throw new SolrException(ErrorCode.SERVER_ERROR, "Map does not represent a ToleratedUpdateError, must contain 'type', 'id', and 'message'");
+      throw new SolrException(
+          ErrorCode.SERVER_ERROR,
+          "Map does not represent a ToleratedUpdateError, must contain 'type', 'id', and 'message'");
     }
     try {
       return new ToleratedUpdateError(CmdType.valueOf(t), id, message);
     } catch (IllegalArgumentException iae) {
-      throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid type for ToleratedUpdateError: " + t, iae);
+      throw new SolrException(
+          ErrorCode.SERVER_ERROR, "Invalid type for ToleratedUpdateError: " + t, iae);
     }
   }
-  
-  /** 
-   * returns a ToleratedUpdateError instance if this metadataKey is one we care about, else null 
+
+  /**
+   * returns a ToleratedUpdateError instance if this metadataKey is one we care about, else null
+   *
    * @see #getMetadataKey
    * @see #getMetadataValue
    */
-  public static ToleratedUpdateError parseMetadataIfToleratedUpdateError(String metadataKey,
-                                                                         String metadataVal) {
-    if (! metadataKey.startsWith(META_PRE)) {
+  public static ToleratedUpdateError parseMetadataIfToleratedUpdateError(
+      String metadataKey, String metadataVal) {
+    if (!metadataKey.startsWith(META_PRE)) {
       return null; // not a key we care about
     }
     final int typeEnd = metadataKey.indexOf(':', META_PRE_LEN);
     if (typeEnd < 0) {
-      return null; // has our prefix, but not our format -- must not be a key we (actually) care about
+      return null; // has our prefix, but not our format -- must not be a key we (actually) care
+      // about

Review comment:
       awkward

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TopicStream.java
##########
@@ -226,54 +242,67 @@ public StreamExpression toExpression(StreamFactory factory) throws IOException {
     // zkHost
     expression.addParameter(new StreamExpressionNamedParameter("zkHost", zkHost));
     expression.addParameter(new StreamExpressionNamedParameter(ID, id));
-    if(initialCheckpoint > -1) {
-      expression.addParameter(new StreamExpressionNamedParameter("initialCheckpoint", Long.toString(initialCheckpoint)));
+    if (initialCheckpoint > -1) {
+      expression.addParameter(
+          new StreamExpressionNamedParameter(
+              "initialCheckpoint", Long.toString(initialCheckpoint)));
     }
-    expression.addParameter(new StreamExpressionNamedParameter("checkpointEvery", Long.toString(checkpointEvery)));
+    expression.addParameter(
+        new StreamExpressionNamedParameter("checkpointEvery", Long.toString(checkpointEvery)));
 
     return expression;
   }
-  
+
   @Override
   public Explanation toExplanation(StreamFactory factory) throws IOException {
 
     StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
-    
+
     explanation.setFunctionName(factory.getFunctionName(this.getClass()));
     explanation.setImplementingClass(this.getClass().getName());
     explanation.setExpressionType(ExpressionType.STREAM_SOURCE);
     explanation.setExpression(toExpression(factory).toString());
-    
+
     {
       // child 1 is a datastore so add it at this point
       StreamExplanation child = new StreamExplanation(getStreamNodeId() + "-datastore");
-      child.setFunctionName(String.format(Locale.ROOT, "solr (%s)", collection)); 
-        // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be in a
-        // parallel stream.
-      
+      child.setFunctionName(String.format(Locale.ROOT, "solr (%s)", collection));
+      // TODO: fix this so we know the # of workers - check with Joel about a Topic's ability to be
+      // in a

Review comment:
       awkward




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on a change in pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #706:
URL: https://github.com/apache/solr/pull/706#discussion_r814364912



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
##########
@@ -469,18 +481,20 @@ public synchronized void blockUntilFinished() throws IOException {
 
       synchronized (runners) {
 
-        // NOTE: if the executor is shut down, runners may never become empty (a scheduled task may never be run,
-        // which means it would never remove itself from the runners list. This is why we don't wait forever
+        // NOTE: if the executor is shut down, runners may never become empty (a scheduled task may
+        // never be run,
+        // which means it would never remove itself from the runners list. This is why we don't wait
+        // forever

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
##########
@@ -225,85 +227,90 @@ void sendUpdateStream() throws Exception {
           } finally {
             inPoll = false;
           }
-          if (update == null)
-            break;
+          if (update == null) break;
 
           String contentType = client.requestWriter.getUpdateContentType();
           final boolean isXml = ClientUtils.TEXT_XML.equals(contentType);
 
-          final ModifiableSolrParams origParams = new ModifiableSolrParams(update.getRequest().getParams());
+          final ModifiableSolrParams origParams =
+              new ModifiableSolrParams(update.getRequest().getParams());
           final String origTargetCollection = update.getCollection();
 
-          EntityTemplate template = new EntityTemplate(new ContentProducer() {
-            
-            @Override
-            public void writeTo(OutputStream out) throws IOException {
+          EntityTemplate template =
+              new EntityTemplate(
+                  new ContentProducer() {
 
-              if (isXml) {
-                out.write("<stream>".getBytes(StandardCharsets.UTF_8)); // can be anything
-              }
-              Update upd = update;
-              while (upd != null) {
-                UpdateRequest req = upd.getRequest();
-                SolrParams currentParams = new ModifiableSolrParams(req.getParams());
-                if (!origParams.toNamedList().equals(currentParams.toNamedList()) || !StringUtils.equals(origTargetCollection, upd.getCollection())) {
-                  queue.add(upd); // Request has different params or destination core/collection, return to queue
-                  break;
-                }
+                    @Override
+                    public void writeTo(OutputStream out) throws IOException {
 
-                client.requestWriter.write(req, out);
-                if (isXml) {
-                  // check for commit or optimize
-                  SolrParams params = req.getParams();
-                  if (params != null) {
-                    String fmt = null;
-                    if (params.getBool(UpdateParams.OPTIMIZE, false)) {
-                      fmt = "<optimize waitSearcher=\"%s\" />";
-                    } else if (params.getBool(UpdateParams.COMMIT, false)) {
-                      fmt = "<commit waitSearcher=\"%s\" />";
-                    }
-                    if (fmt != null) {
-                      byte[] content = String.format(Locale.ROOT,
-                          fmt, params.getBool(UpdateParams.WAIT_SEARCHER, false)
-                              + "")
-                          .getBytes(StandardCharsets.UTF_8);
-                      out.write(content);
-                    }
-                  }
-                }
-                out.flush();
-
-                notifyQueueAndRunnersIfEmptyQueue();
-                inPoll = true;
-                try {
-                  while (true) {
-                    try {
-                      upd = queue.poll(pollQueueTime, TimeUnit.MILLISECONDS);
-                      break;
-                    } catch (InterruptedException e) {
-                      if (log.isDebugEnabled()) pollInterrupts.incrementAndGet();
-                      if (!queue.isEmpty()) {
-                        continue;
+                      if (isXml) {
+                        out.write("<stream>".getBytes(StandardCharsets.UTF_8)); // can be anything
+                      }
+                      Update upd = update;
+                      while (upd != null) {
+                        UpdateRequest req = upd.getRequest();
+                        SolrParams currentParams = new ModifiableSolrParams(req.getParams());
+                        if (!origParams.toNamedList().equals(currentParams.toNamedList())
+                            || !StringUtils.equals(origTargetCollection, upd.getCollection())) {
+                          queue.add(
+                              upd); // Request has different params or destination core/collection,
+                          // return to queue

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/BiJoinStream.java
##########
@@ -28,67 +28,78 @@
 import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
 
 /**
- * Joins leftStream with rightStream based on a Equalitor. Both streams must be sorted by the fields being joined on.
- * Resulting stream is sorted by the equalitor.
+ * Joins leftStream with rightStream based on a Equalitor. Both streams must be sorted by the fields
+ * being joined on. Resulting stream is sorted by the equalitor.
+ *
  * @since 6.0.0
- **/
-
+ */
 public abstract class BiJoinStream extends JoinStream implements Expressible {
-  
+
   protected PushBackStream leftStream;
   protected PushBackStream rightStream;
-  
-  // This is used to determine whether we should iterate the left or right side (depending on stream order).
+
+  // This is used to determine whether we should iterate the left or right side (depending on stream
+  // order).
   // It is built from the incoming equalitor and streams' comparators.
   protected StreamComparator iterationComparator;
   protected StreamComparator leftStreamComparator, rightStreamComparator;
-  
-  public BiJoinStream(TupleStream leftStream, TupleStream rightStream, StreamEqualitor eq) throws IOException {
+
+  public BiJoinStream(TupleStream leftStream, TupleStream rightStream, StreamEqualitor eq)
+      throws IOException {
     super(eq, leftStream, rightStream);
     init();
   }
-  
+
   public BiJoinStream(StreamExpression expression, StreamFactory factory) throws IOException {
     super(expression, factory);
     init();
   }
-  
+
   private void init() throws IOException {
-    
+
     // Validates all incoming streams for tuple order
     validateTupleOrder();
-    
+
     leftStream = getStream(0);
     rightStream = getStream(1);
-    
-    // iterationComparator is a combination of the equalitor and the comp from each stream. This can easily be done by
-    // grabbing the first N parts of each comp where N is the number of parts in the equalitor. Because we've already
+
+    // iterationComparator is a combination of the equalitor and the comp from each stream. This can
+    // easily be done by
+    // grabbing the first N parts of each comp where N is the number of parts in the equalitor.
+    // Because we've already

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/OuterHashJoinStream.java
##########
@@ -18,116 +18,121 @@
 
 import java.io.IOException;
 import java.util.List;
-
 import org.apache.solr.client.solrj.io.Tuple;
 import org.apache.solr.client.solrj.io.stream.expr.Expressible;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionNamedParameter;
 import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
 
 /**
- * Takes two streams (fullStream and hashStream) and joins them similar to an LeftOuterJoinStream. The difference
- * in a OuterHashJoinStream is that the tuples in the hashStream will all be read and hashed when this stream is
- * opened. This provides a few optimizations iff the hashStream has a relatively small number of documents.
- * The difference between this and a HashJoinStream is that a tuple in the fullStream will be returned even
- * if it doesn't have any matching tuples in the hashStream. 
- * You are expected to provide a set of fields for which the hash will be calculated from. If a tuple from the 
- * hashStream does not contain a value (ie, null) for one of the fields the hash is being computed on then that 
- * tuple will not be considered a match to anything. If a tuple from the fullStream does not contain a value (ie, null) 
- * for one of the fields the hash is being computed on then that tuple will be returned without any joined tuples
- * from the hashStream
+ * Takes two streams (fullStream and hashStream) and joins them similar to an LeftOuterJoinStream.
+ * The difference in a OuterHashJoinStream is that the tuples in the hashStream will all be read and
+ * hashed when this stream is opened. This provides a few optimizations iff the hashStream has a
+ * relatively small number of documents. The difference between this and a HashJoinStream is that a
+ * tuple in the fullStream will be returned even if it doesn't have any matching tuples in the
+ * hashStream. You are expected to provide a set of fields for which the hash will be calculated
+ * from. If a tuple from the hashStream does not contain a value (ie, null) for one of the fields
+ * the hash is being computed on then that tuple will not be considered a match to anything. If a
+ * tuple from the fullStream does not contain a value (ie, null) for one of the fields the hash is
+ * being computed on then that tuple will be returned without any joined tuples from the hashStream
+ *
  * @since 6.0.0
-**/
+ */
 public class OuterHashJoinStream extends HashJoinStream implements Expressible {
-  
+
   private static final long serialVersionUID = 1L;
 
-  public OuterHashJoinStream(TupleStream fullStream, TupleStream hashStream, List<String> hashOn) throws IOException {
+  public OuterHashJoinStream(TupleStream fullStream, TupleStream hashStream, List<String> hashOn)
+      throws IOException {
     super(fullStream, hashStream, hashOn);
   }
-  
-  public OuterHashJoinStream(StreamExpression expression,StreamFactory factory) throws IOException {
+
+  public OuterHashJoinStream(StreamExpression expression, StreamFactory factory)
+      throws IOException {
     super(expression, factory);
   }
-    
+
   @Override
-  public StreamExpression toExpression(StreamFactory factory) throws IOException {    
+  public StreamExpression toExpression(StreamFactory factory) throws IOException {
     // function name
     StreamExpression expression = new StreamExpression(factory.getFunctionName(this.getClass()));
-    
+
     // streams
-    if(hashStream instanceof Expressible && fullStream instanceof Expressible){
-      expression.addParameter(((Expressible)fullStream).toExpression(factory));
-      expression.addParameter(new StreamExpressionNamedParameter("hashed", ((Expressible)hashStream).toExpression(factory)));
+    if (hashStream instanceof Expressible && fullStream instanceof Expressible) {
+      expression.addParameter(((Expressible) fullStream).toExpression(factory));
+      expression.addParameter(
+          new StreamExpressionNamedParameter(
+              "hashed", ((Expressible) hashStream).toExpression(factory)));
+    } else {
+      throw new IOException(
+          "This OuterHashJoinStream contains a non-expressible TupleStream - it cannot be converted to an expression");
     }
-    else{
-      throw new IOException("This OuterHashJoinStream contains a non-expressible TupleStream - it cannot be converted to an expression");
-    }
-    
+
     // on
     StringBuilder sb = new StringBuilder();
-    for(int idx = 0; idx < leftHashOn.size(); ++idx){
-      if(sb.length() > 0){ sb.append(","); }
-      
+    for (int idx = 0; idx < leftHashOn.size(); ++idx) {
+      if (sb.length() > 0) {
+        sb.append(",");
+      }
+
       // we know that left and right hashOns are the same size
       String left = leftHashOn.get(idx);
       String right = rightHashOn.get(idx);
-      
-      if(left.equals(right)){ 
-        sb.append(left); 
-      }
-      else{
+
+      if (left.equals(right)) {
+        sb.append(left);
+      } else {
         sb.append(left);
         sb.append("=");
         sb.append(right);
       }
     }
-    expression.addParameter(new StreamExpressionNamedParameter("on",sb.toString()));
-    
-    return expression;   
+    expression.addParameter(new StreamExpressionNamedParameter("on", sb.toString()));
+
+    return expression;
   }
 
   public Tuple read() throws IOException {
-    
-    if(null == workingFullTuple){
+
+    if (null == workingFullTuple) {
       Tuple fullTuple = fullStream.read();
-      
+
       // We're at the end of the line
-      if(fullTuple.EOF){
+      if (fullTuple.EOF) {
         return fullTuple;
       }
-      
+
       // If fullTuple doesn't have a valid hash or the hash cannot be found in the hashedTuples then
       // return the tuple from fullStream.
-      // This is an outer join so there is no requirement there be a matching value in the hashed stream
+      // This is an outer join so there is no requirement there be a matching value in the hashed
+      // stream
       String fullHash = computeHash(fullTuple, leftHashOn);
-      if(null == fullHash || !hashedTuples.containsKey(fullHash)){
+      if (null == fullHash || !hashedTuples.containsKey(fullHash)) {
         return fullTuple.clone();
       }
-      
+
       workingFullTuple = fullTuple;
       workingFullHash = fullHash;
-      workngHashSetIdx = 0;      
+      workngHashSetIdx = 0;
     }
-  
+
     // At this point we know we have at least one doc to match on
-    // Due to the check at the end, before returning, we know we have at least one to match with left
+    // Due to the check at the end, before returning, we know we have at least one to match with
+    // left

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
##########
@@ -129,60 +129,66 @@ public static State getState(String stateStr) {
 
   public static final String REPLICAS = "replicas";
   public static final String RANGE = "range";
-  public static final String LEADER = "leader";       // FUTURE: do we want to record the leader as a slice property in the JSON (as opposed to isLeader as a replica property?)
+  public static final String LEADER =
+      "leader"; // FUTURE: do we want to record the leader as a slice property in the JSON (as
+  // opposed to isLeader as a replica property?)

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
##########
@@ -535,23 +555,25 @@ private HttpEntityEnclosingRequestBase fillContentStream(
     }
 
     method.setConfig(requestConfigBuilder.build());
-    
+
     HttpEntity entity = null;
     InputStream respBody = null;
     boolean shouldClose = true;
     try {
       // Execute the method.
-      HttpClientContext httpClientRequestContext = HttpClientUtil.createNewHttpClientRequestContext();
+      HttpClientContext httpClientRequestContext =
+          HttpClientUtil.createNewHttpClientRequestContext();
       if (userPrincipal != null) {
         // Normally the context contains a static userToken to enable reuse resources.
         // However, if a personal Principal object exists, we use that instead, also as a means
-        // to transfer authentication information to Auth plugins that wish to intercept the request later
+        // to transfer authentication information to Auth plugins that wish to intercept the request
+        // later

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
##########
@@ -687,15 +729,18 @@ private HttpEntityEnclosingRequestBase fillContentStream(
     }
   }
 
-  // When raising an error using HTTP sendError, mime types can be mismatched. This is specifically true when
-  // SolrDispatchFilter uses the sendError mechanism since the expected MIME type of response is not HTML but
+  // When raising an error using HTTP sendError, mime types can be mismatched. This is specifically
+  // true when
+  // SolrDispatchFilter uses the sendError mechanism since the expected MIME type of response is not
+  // HTML but
   // HTTP sendError generates a HTML output, which can lead to mismatch

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateHttp2SolrClient.java
##########
@@ -322,20 +325,25 @@ private void notifyQueueAndRunnersIfEmptyQueue() {
       }
       synchronized (runners) {
         // we notify runners too - if there is a high queue poll time and this is the update
-        // that emptied the queue, we make an attempt to avoid the 250ms timeout in blockUntilFinished
+        // that emptied the queue, we make an attempt to avoid the 250ms timeout in
+        // blockUntilFinished
         runners.notifyAll();
       }
     }
   }
 
   // *must* be called with runners monitor held, e.g. synchronized(runners){ addRunner() }
   private void addRunner() {
-    MDC.put("ConcurrentUpdateHttp2SolrClient.url", String.valueOf(client.getBaseURL())); // MDC can't have null value
+    MDC.put(
+        "ConcurrentUpdateHttp2SolrClient.url",
+        String.valueOf(client.getBaseURL())); // MDC can't have null value
     try {
       Runner r = new Runner();
       runners.add(r);
       try {
-        scheduler.execute(r);  // this can throw an exception if the scheduler has been shutdown, but that should be fine.
+        scheduler.execute(
+            r); // this can throw an exception if the scheduler has been shutdown, but that should
+        // be fine.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
##########
@@ -31,33 +30,36 @@
 import org.apache.solr.common.params.StatsParams;
 import org.apache.solr.common.params.TermsParams;
 
-
 /**
- * This is an augmented SolrParams with get/set/add fields for common fields used
- * in the Standard and Dismax request handlers
- * 
+ * This is an augmented SolrParams with get/set/add fields for common fields used in the Standard
+ * and Dismax request handlers
  *
  * @since solr 1.3
  */
-public class SolrQuery extends ModifiableSolrParams 
-{  
-  public static final String DOCID = "_docid_"; // duplicate of org.apache.solr.search.SortSpecParsing.DOCID which is not accessible from here
-  
-  public enum ORDER { desc, asc;
+public class SolrQuery extends ModifiableSolrParams {
+  public static final String DOCID =
+      "_docid_"; // duplicate of org.apache.solr.search.SortSpecParsing.DOCID which is not
+  // accessible from here

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/FieldAnalysisRequest.java
##########
@@ -112,14 +107,13 @@ static String listToCommaDelimitedString(List<String> list) {
     return result.toString();
   }
 
-
-  //============================================ Setter/Getter Methods ===============================================
+  // ============================================ Setter/Getter Methods
+  // ===============================================
 
   /**
    * Sets the field value to be analyzed.
    *
    * @param fieldValue The field value to be analyzed.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
##########
@@ -1769,31 +1920,37 @@ public SolrParams getParams() {
       params.set("collections", aliasedCollections);
       return params;
     }
-
   }
 
   /**
-   * Returns a SolrRequest to create a time routed alias. For time based routing, the start
-   * should be a standard Solr timestamp string (possibly with "date math").
+   * Returns a SolrRequest to create a time routed alias. For time based routing, the start should
+   * be a standard Solr timestamp string (possibly with "date math").
    *
    * @param aliasName the name of the alias to create.
-   * @param start the start of the routing.  A standard Solr date: ISO-8601 or NOW with date math.
-   * @param interval date math representing the time duration of each collection (e.g. {@code +1DAY})
+   * @param start the start of the routing. A standard Solr date: ISO-8601 or NOW with date math.
+   * @param interval date math representing the time duration of each collection (e.g. {@code
+   *     +1DAY})
    * @param routerField the document field to contain the timestamp to route on
-   * @param createCollTemplate Holds options to create a collection.  The "name" is ignored.
+   * @param createCollTemplate Holds options to create a collection. The "name" is ignored.
    */
-  public static CreateTimeRoutedAlias createTimeRoutedAlias(String aliasName, String start,
-                                                            String interval,
-                                                            String routerField,
-                                                            Create createCollTemplate) {
+  public static CreateTimeRoutedAlias createTimeRoutedAlias(
+      String aliasName,
+      String start,
+      String interval,
+      String routerField,
+      Create createCollTemplate) {
 
     return new CreateTimeRoutedAlias(aliasName, routerField, start, interval, createCollTemplate);
   }
 
-  public static class CreateTimeRoutedAlias extends AsyncCollectionAdminRequest implements RoutedAliasAdminRequest {
-    // TODO: This and other commands in this file seem to need to share some sort of constants class with core
-    // to allow this stuff not to be duplicated. (this is pasted from CreateAliasCmd.java), however I think
-    // a comprehensive cleanup of this for all the requests in this class should be done as a separate ticket.
+  public static class CreateTimeRoutedAlias extends AsyncCollectionAdminRequest
+      implements RoutedAliasAdminRequest {
+    // TODO: This and other commands in this file seem to need to share some sort of constants class
+    // with core
+    // to allow this stuff not to be duplicated. (this is pasted from CreateAliasCmd.java), however
+    // I think
+    // a comprehensive cleanup of this for all the requests in this class should be done as a
+    // separate ticket.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/beans/DocumentObjectBinder.java
##########
@@ -217,11 +220,13 @@ private void storeName(Field annotation) {
             name = setter.getName();
           }
         }
-      } else if (annotation.value().indexOf('*') >= 0) { //dynamic fields are annotated as @Field("categories_*")
-        //if the field was annotated as a dynamic field, convert the name into a pattern
-        //the wildcard (*) is supposed to be either a prefix or a suffix, hence the use of replaceFirst
+      } else if (annotation.value().indexOf('*')
+          >= 0) { // dynamic fields are annotated as @Field("categories_*")

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
##########
@@ -416,7 +431,9 @@ private void addRunner() {
       Runner r = new Runner();
       runners.add(r);
       try {
-        scheduler.execute(r);  // this can throw an exception if the scheduler has been shutdown, but that should be fine.
+        scheduler.execute(
+            r); // this can throw an exception if the scheduler has been shutdown, but that should
+        // be fine.

Review comment:
       fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.java
##########
@@ -584,20 +604,22 @@ public synchronized void blockUntilFinished() throws IOException {
 
       synchronized (runners) {
 
-        // NOTE: if the executor is shut down, runners may never become empty (a scheduled task may never be run,
-        // which means it would never remove itself from the runners list. This is why we don't wait forever
+        // NOTE: if the executor is shut down, runners may never become empty (a scheduled task may
+        // never be run,
+        // which means it would never remove itself from the runners list. This is why we don't wait
+        // forever
         // and periodically check if the scheduler is shutting down.
         int loopCount = 0;

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CloudSolrStream.java
##########
@@ -288,16 +308,17 @@ private StreamComparator parseComp(String sort, String fl) throws IOException {
 
     String[] fls = fl.split(",");
     HashSet<String> fieldSet = new HashSet<>();
-    for(String f : fls) {
-      fieldSet.add(f.trim()); //Handle spaces in the field list.
+    for (String f : fls) {
+      fieldSet.add(f.trim()); // Handle spaces in the field list.
     }
 
     String[] sorts = sort.split(",");
     StreamComparator[] comps = new StreamComparator[sorts.length];
-    for(int i=0; i<sorts.length; i++) {
+    for (int i = 0; i < sorts.length; i++) {
       String s = sorts[i];
 
-      String[] spec = s.trim().split("\\s+"); //This should take into account spaces in the sort spec.
+      String[] spec =

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashJoinStream.java
##########
@@ -234,53 +259,53 @@ public void close() throws IOException {
   }
 
   public Tuple read() throws IOException {
-    
+
     findNextWorkingFullTuple:
-    while(null == workingFullTuple){
+    while (null == workingFullTuple) {
       Tuple fullTuple = fullStream.read();
-      
+
       // We're at the end of the line
-      if(fullTuple.EOF){
+      if (fullTuple.EOF) {
         return fullTuple;
       }
-      
-      // If fullTuple doesn't have a valid hash or if there is no doc to 
+
+      // If fullTuple doesn't have a valid hash or if there is no doc to
       // join with then retry loop - keep going until we find one
       String fullHash = computeHash(fullTuple, leftHashOn);
-      if(null == fullHash || !hashedTuples.containsKey(fullHash)){
+      if (null == fullHash || !hashedTuples.containsKey(fullHash)) {
         continue findNextWorkingFullTuple;
       }
-      
+
       workingFullTuple = fullTuple;
       workingFullHash = fullHash;
-      workngHashSetIdx = 0;      
+      workngHashSetIdx = 0;
     }
-    
+
     // At this point we know we have at least one doc to match on
-    // Due to the check at the end, before returning, we know we have at least one to match with left
+    // Due to the check at the end, before returning, we know we have at least one to match with
+    // left

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/DocumentAnalysisRequest.java
##########
@@ -99,17 +94,17 @@ public ModifiableSolrParams getParams() {
     return params;
   }
 
-  //================================================ Helper Methods ==================================================
+  // ================================================ Helper Methods
+  // ==================================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/FieldAnalysisRequest.java
##########
@@ -92,13 +87,13 @@ public String getRequestType() {
     return SolrRequestType.QUERY.toString();
   }
 
-  //================================================ Helper Methods ==================================================
+  // ================================================ Helper Methods
+  // ==================================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/HealthCheckRequest.java
##########
@@ -42,22 +41,23 @@ private HealthCheckRequest(METHOD m, String path) {
   }
 
   public void setMaxGenerationLag(int maxLagAllowed) {
-      this.maxLagAllowed = OptionalInt.of(maxLagAllowed);
+    this.maxLagAllowed = OptionalInt.of(maxLagAllowed);
   }
 
   @Override
   public SolrParams getParams() {
-      if (maxLagAllowed.isPresent()) {
-          ModifiableSolrParams params = new ModifiableSolrParams();
-          params.set(PARAM_MAX_GENERATION_LAG, maxLagAllowed.getAsInt());
-          return params;
-      }
-      return null;
+    if (maxLagAllowed.isPresent()) {
+      ModifiableSolrParams params = new ModifiableSolrParams();
+      params.set(PARAM_MAX_GENERATION_LAG, maxLagAllowed.getAsInt());
+      return params;
+    }
+    return null;
   }
 
   @Override
   protected HealthCheckResponse createResponse(SolrClient client) {
-    // TODO: Accept requests w/ CloudSolrClient while ensuring that the request doesn't get routed to
+    // TODO: Accept requests w/ CloudSolrClient while ensuring that the request doesn't get routed
+    // to
     // an unintended recepient.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/DocumentAnalysisRequest.java
##########
@@ -121,14 +116,13 @@ String getXML(Writer writer) throws IOException {
     return (xml.length() > 0) ? xml : null;
   }
 
-
-  //============================================ Setter/Getter Methods ===============================================
+  // ============================================ Setter/Getter Methods
+  // ===============================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/ops/ReplaceOperation.java
##########
@@ -27,63 +26,69 @@
 import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
 
 /**
- * Replaces some tuple value with another. The replacement value can be either a given value or the 
- * value of another field in the tuple. The expression for a replace operation can be of multiple forms:
- *  replace(fieldA, 0, withValue=100)  // for fieldA if equals 0 then set to 100
- *  replace(fieldA, null, withValue=0) // for fieldA if null then set to 0
- *  replace(fieldA, null, withField=fieldB) // for fieldA if null then set to the value of fieldB (if fieldB is null then fieldA will end up as null)
- *  replace(fieldA, 0, withField=fieldB) // for fieldA if 0 then set to the value of fieldB (if fieldB is 0 then fieldA will end up as 0)
- *  replace(fieldA, "Izzy and Kayden", withValue="my kids")
- *  
- * You can also construct these without the field name in the expression but that does require that you provide the field name during construction.
- * This is most useful during metric calculation because when calculating a metric you have already provided a field name in the metric so there
- * is no reason to have to provide the field name again in the operation
- *  sum(fieldA, replace(null, withValue=0)) // performs the replacement on fieldA
- *  
- * Equality is determined by the standard type .equals() functions.
+ * Replaces some tuple value with another. The replacement value can be either a given value or the
+ * value of another field in the tuple. The expression for a replace operation can be of multiple
+ * forms: replace(fieldA, 0, withValue=100) // for fieldA if equals 0 then set to 100
+ * replace(fieldA, null, withValue=0) // for fieldA if null then set to 0 replace(fieldA, null,
+ * withField=fieldB) // for fieldA if null then set to the value of fieldB (if fieldB is null then
+ * fieldA will end up as null) replace(fieldA, 0, withField=fieldB) // for fieldA if 0 then set to
+ * the value of fieldB (if fieldB is 0 then fieldA will end up as 0) replace(fieldA, "Izzy and
+ * Kayden", withValue="my kids")

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/graph/GatherNodesStream.java
##########
@@ -397,51 +429,54 @@ private StreamExpression toExpression(StreamFactory factory, boolean includeStre
 
     return expression;
   }
-  
+
   @Override
   public Explanation toExplanation(StreamFactory factory) throws IOException {
 
     StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
-    
+
     explanation.setFunctionName(factory.getFunctionName(this.getClass()));
     explanation.setImplementingClass(this.getClass().getName());
     explanation.setExpressionType(ExpressionType.GRAPH_SOURCE);
     explanation.setExpression(toExpression(factory).toString());
-    
+
     // one child is a stream
     explanation.addChild(tupleStream.toExplanation(factory));
-    
+
     // one child is a datastore so add it at this point
     StreamExplanation child = new StreamExplanation(getStreamNodeId() + "-datastore");
     child.setFunctionName("solr (graph)");
     child.setImplementingClass("Solr/Lucene");
-    child.setExpressionType(ExpressionType.DATASTORE);    
-    child.setExpression(queryParams.entrySet().stream().map(e -> String.format(Locale.ROOT, "%s=%s", e.getKey(), e.getValue())).collect(Collectors.joining(",")));    
+    child.setExpressionType(ExpressionType.DATASTORE);
+    child.setExpression(
+        queryParams.entrySet().stream()
+            .map(e -> String.format(Locale.ROOT, "%s=%s", e.getKey(), e.getValue()))
+            .collect(Collectors.joining(",")));
     explanation.addChild(child);
-    
-    if(null != metrics){
-      for(Metric metric : metrics){
-          explanation.addHelper(metric.toExplanation(factory));
+
+    if (null != metrics) {
+      for (Metric metric : metrics) {
+        explanation.addHelper(metric.toExplanation(factory));
       }
     }
-    
+
     return explanation;
   }
 
-
   public void setStreamContext(StreamContext context) {
     this.traversal = (Traversal) context.get("traversal");
     if (traversal == null) {
-      //No traversal in the context. So create a new context and a new traversal.
-      //This ensures that two separate traversals in the same expression don't pollute each others traversal.
+      // No traversal in the context. So create a new context and a new traversal.
+      // This ensures that two separate traversals in the same expression don't pollute each others
+      // traversal.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/XMLResponseParser.java
##########
@@ -225,77 +265,87 @@ public static KnownType get( String v )
 
     // just eat up the events...
     int depth = 0;
-    while( true )
-    {
+    while (true) {
       switch (parser.next()) {
-      case XMLStreamConstants.START_ELEMENT:
-        depth++;
-        builder.setLength( 0 ); // reset the text
-        type = KnownType.get( parser.getLocalName() );
-        if( type == null ) {
-          throw new RuntimeException( "this must be known type! not: "+parser.getLocalName() );
-        }
+        case XMLStreamConstants.START_ELEMENT:
+          depth++;
+          builder.setLength(0); // reset the text
+          type = KnownType.get(parser.getLocalName());
+          if (type == null) {
+            throw new RuntimeException("this must be known type! not: " + parser.getLocalName());
+          }
 
-        name = null;
-        int cnt = parser.getAttributeCount();
-        for( int i=0; i<cnt; i++ ) {
-          if( "name".equals( parser.getAttributeLocalName( i ) ) ) {
-            name = parser.getAttributeValue( i );
-            break;
+          name = null;
+          int cnt = parser.getAttributeCount();
+          for (int i = 0; i < cnt; i++) {
+            if ("name".equals(parser.getAttributeLocalName(i))) {
+              name = parser.getAttributeValue(i);
+              break;
+            }
           }
-        }
 
-        /** The name in a NamedList can actually be null
-        if( name == null ) {
-          throw new XMLStreamException( "requires 'name' attribute: "+parser.getLocalName(), parser.getLocation() );
-        }
-        **/
-
-        if( !type.isLeaf ) {
-          switch( type ) {
-          case LST:    nl.add( name, readNamedList( parser ) ); depth--; continue;
-          case ARR:    nl.add( name, readArray(     parser ) ); depth--; continue;
-          case RESULT: nl.add( name, readDocuments( parser ) ); depth--; continue;
-          case DOC:    nl.add( name, readDocument(  parser ) ); depth--; continue;
-          case BOOL:
-          case DATE:
-          case DOUBLE:
-          case FLOAT:
-          case INT:
-          case LONG:
-          case NULL:
-          case STR:
-          case RAW:
-            break;
+          /**
+           * The name in a NamedList can actually be null if( name == null ) { throw new
+           * XMLStreamException( "requires 'name' attribute: "+parser.getLocalName(),
+           * parser.getLocation() ); }
+           */
+          if (!type.isLeaf) {
+            switch (type) {
+              case LST:
+                nl.add(name, readNamedList(parser));
+                depth--;
+                continue;
+              case ARR:
+                nl.add(name, readArray(parser));
+                depth--;
+                continue;
+              case RESULT:
+                nl.add(name, readDocuments(parser));
+                depth--;
+                continue;
+              case DOC:
+                nl.add(name, readDocument(parser));
+                depth--;
+                continue;
+              case BOOL:
+              case DATE:
+              case DOUBLE:
+              case FLOAT:
+              case INT:
+              case LONG:
+              case NULL:
+              case STR:
+              case RAW:
+                break;
+            }
+            throw new XMLStreamException("branch element not handled!", parser.getLocation());
           }
-          throw new XMLStreamException( "branch element not handled!", parser.getLocation() );
-        }
-        break;
+          break;
 
-      case XMLStreamConstants.END_ELEMENT:
-        if( --depth < 0 ) {
-          return nl;
-        }
-        //System.out.println( "NL:ELEM:"+type+"::"+name+"::"+builder );
-        nl.add( name, type.read( builder.toString().trim() ) );
-        break;
-
-      case XMLStreamConstants.SPACE: // TODO?  should this be trimmed? make sure it only gets one/two space?
-      case XMLStreamConstants.CDATA:
-      case XMLStreamConstants.CHARACTERS:
-        builder.append( parser.getText() );
-        break;
+        case XMLStreamConstants.END_ELEMENT:
+          if (--depth < 0) {
+            return nl;
+          }
+          // System.out.println( "NL:ELEM:"+type+"::"+name+"::"+builder );
+          nl.add(name, type.read(builder.toString().trim()));
+          break;
+
+        case XMLStreamConstants
+            .SPACE: // TODO?  should this be trimmed? make sure it only gets one/two space?

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JoinStream.java
##########
@@ -131,81 +141,88 @@ public Explanation toExplanation(StreamFactory factory) throws IOException {
     explanation.setExpressionType(ExpressionType.STREAM_DECORATOR);
     explanation.setExpression(toExpression(factory, false).toString());
     explanation.addHelper(eq.toExplanation(factory));
-    
-    for(TupleStream stream : streams){
+
+    for (TupleStream stream : streams) {
       explanation.addChild(stream.toExplanation(factory));
     }
-    
-    return explanation;    
+
+    return explanation;
   }
-  
+
   public void setStreamContext(StreamContext context) {
     for (PushBackStream stream : streams) {
       stream.setStreamContext(context);
     }
   }
-  
+
   public void open() throws IOException {
     for (PushBackStream stream : streams) {
       stream.open();
     }
   }
-  
+
   public void close() throws IOException {
     for (PushBackStream stream : streams) {
       stream.close();
     }
   }
-  
+
   public List<TupleStream> children() {
     List<TupleStream> list = new ArrayList<TupleStream>();
     for (TupleStream stream : streams) {
       list.add(stream);
     }
     return list;
   }
-  
+
   public PushBackStream getStream(int idx) {
     if (streams.size() > idx) {
       return streams.get(idx);
     }
-    
-    throw new IllegalArgumentException(String.format(Locale.ROOT,"Stream idx=%d doesn't exist. Number of streams is %d", idx,
-        streams.size()));
+
+    throw new IllegalArgumentException(
+        String.format(
+            Locale.ROOT,
+            "Stream idx=%d doesn't exist. Number of streams is %d",
+            idx,
+            streams.size()));
   }
-  
+
   protected boolean isValidTupleOrder() {
-    // Validate that the equalitor is derivable from the comparator in each stream. If it is, then we know all stream

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/MergeStream.java
##########
@@ -132,118 +148,119 @@ public Explanation toExplanation(StreamFactory factory) throws IOException {
     explanation.setExpressionType(ExpressionType.STREAM_DECORATOR);
     explanation.setExpression(toExpression(factory, false).toString());
     explanation.addHelper(comp.toExplanation(factory));
-    
-    for(PushBackStream stream : streams){
+
+    for (PushBackStream stream : streams) {
       explanation.addChild(stream.toExplanation(factory));
     }
-    
-    return explanation;    
+
+    return explanation;
   }
 
   public void setStreamContext(StreamContext context) {
-    for(PushBackStream stream : streams){
+    for (PushBackStream stream : streams) {
       stream.setStreamContext(context);
     }
   }
 
   public List<TupleStream> children() {
-    List<TupleStream> l =  new ArrayList<TupleStream>();
-    for(PushBackStream stream : streams){
+    List<TupleStream> l = new ArrayList<TupleStream>();
+    for (PushBackStream stream : streams) {
       l.add(stream);
     }
     return l;
   }
 
   public void open() throws IOException {
-    for(PushBackStream stream : streams){
+    for (PushBackStream stream : streams) {
       stream.open();
     }
   }
 
   public void close() throws IOException {
-    for(PushBackStream stream : streams){
+    for (PushBackStream stream : streams) {
       stream.close();
     }
   }
 
   public Tuple read() throws IOException {
-    
-    // might be able to optimize this by sorting the streams based on the next to read tuple from each.
-    // if we can ensure the sort of the streams and update it in less than linear time then there would
-    // be some performance gain. But, assuming the # of streams is kinda small then this might not be
+
+    // might be able to optimize this by sorting the streams based on the next to read tuple from
+    // each.
+    // if we can ensure the sort of the streams and update it in less than linear time then there
+    // would
+    // be some performance gain. But, assuming the # of streams is kinda small then this might not
+    // be
     // worth it

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/JDBCStream.java
##########
@@ -538,97 +636,108 @@ public Tuple read() throws IOException {
         // we do not have a record
         tuple.put(StreamParams.EOF, true);
       }
-      
+
       return tuple;
     } catch (SQLException e) {
-      throw new IOException(String.format(Locale.ROOT, "Failed to read next record with error '%s'", e.getMessage()), e);
+      throw new IOException(
+          String.format(Locale.ROOT, "Failed to read next record with error '%s'", e.getMessage()),
+          e);
     }
   }
 
   @Override
   public StreamExpressionParameter toExpression(StreamFactory factory) throws IOException {
-    // functionName(collectionName, param1, param2, ..., paramN, sort="comp", [aliases="field=alias,..."])
-    
+    // functionName(collectionName, param1, param2, ..., paramN, sort="comp",
+    // [aliases="field=alias,..."])
+
     // function name
     StreamExpression expression = new StreamExpression(factory.getFunctionName(this.getClass()));
-    
+
     // connection url
     expression.addParameter(new StreamExpressionNamedParameter("connection", connectionUrl));
-    
+
     // sql
     expression.addParameter(new StreamExpressionNamedParameter("sql", sqlQuery));
 
     // fetchSize
-    expression.addParameter(new StreamExpressionNamedParameter("fetchSize", Integer.toString(fetchSize)));
+    expression.addParameter(
+        new StreamExpressionNamedParameter("fetchSize", Integer.toString(fetchSize)));
 
     // sort
-    expression.addParameter(new StreamExpressionNamedParameter(SORT, definedSort.toExpression(factory)));
-    
+    expression.addParameter(
+        new StreamExpressionNamedParameter(SORT, definedSort.toExpression(factory)));
+
     // driver class
-    if(null != driverClassName){
-      expression.addParameter(new StreamExpressionNamedParameter("driver", driverClassName));      
+    if (null != driverClassName) {
+      expression.addParameter(new StreamExpressionNamedParameter("driver", driverClassName));
     }
-    
+
     // connection properties
-    if(null != connectionProperties){
-      for(String propertyName : connectionProperties.stringPropertyNames()){
-        expression.addParameter(new StreamExpressionNamedParameter(propertyName, connectionProperties.getProperty(propertyName)));    
+    if (null != connectionProperties) {
+      for (String propertyName : connectionProperties.stringPropertyNames()) {
+        expression.addParameter(
+            new StreamExpressionNamedParameter(
+                propertyName, connectionProperties.getProperty(propertyName)));
       }
     }
-        
-    return expression;   
+
+    return expression;
   }
-  
+
   @Override
   public Explanation toExplanation(StreamFactory factory) throws IOException {
 
     StreamExplanation explanation = new StreamExplanation(getStreamNodeId().toString());
-    
+
     explanation.setFunctionName(factory.getFunctionName(this.getClass()));
     explanation.setImplementingClass(this.getClass().getName());
     explanation.setExpressionType(ExpressionType.STREAM_SOURCE);
-    
-    StreamExpression expression = (StreamExpression)toExpression(factory);
+
+    StreamExpression expression = (StreamExpression) toExpression(factory);
     explanation.setExpression(expression.toString());
-    
+
     String driverClassName = this.driverClassName;
-    if(null == driverClassName){
-      try{
+    if (null == driverClassName) {
+      try {
         driverClassName = DriverManager.getDriver(connectionUrl).getClass().getName();
-      }
-      catch(Exception e){
-        driverClassName = String.format(Locale.ROOT, "Failed to find driver for connectionUrl='%s'", connectionUrl);
+      } catch (Exception e) {
+        driverClassName =
+            String.format(
+                Locale.ROOT, "Failed to find driver for connectionUrl='%s'", connectionUrl);
       }
     }
-    
+
     // child is a datastore so add it at this point
     StreamExplanation child = new StreamExplanation(getStreamNodeId() + "-datastore");
     child.setFunctionName("jdbc-source");
     child.setImplementingClass(driverClassName);
-    child.setExpressionType(ExpressionType.DATASTORE);    
+    child.setExpressionType(ExpressionType.DATASTORE);
     child.setExpression(sqlQuery);
-    
+
     explanation.addChild(child);
-    
+
     return explanation;
   }
-  
+
   @Override
   public List<TupleStream> children() {
     return new ArrayList<>();
   }
 
   @Override
   public StreamComparator getStreamSort() {
-    // TODO: Need to somehow figure out the sort applied to the incoming data. This is not something you can ask a JDBC stream
-    // Possibly we can ask the creator to tell us the fields the data is sorted by. This would be duplicate information because
-    // it's already in the sqlQuery but there's no way we can reliably determine the sort from the query.
+    // TODO: Need to somehow figure out the sort applied to the incoming data. This is not something
+    // you can ask a JDBC stream
+    // Possibly we can ask the creator to tell us the fields the data is sorted by. This would be
+    // duplicate information because
+    // it's already in the sqlQuery but there's no way we can reliably determine the sort from the
+    // query.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/UpdateStream.java
##########
@@ -42,25 +41,26 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
 /**
  * Sends tuples emitted by a wrapped {@link TupleStream} as updates to a SolrCloud collection.
+ *
  * @since 6.0.0
  */
 public class UpdateStream extends TupleStream implements Expressible {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-  public static String BATCH_INDEXED_FIELD_NAME = "batchIndexed"; // field name in summary tuple for #docs updated in batch
+  public static String BATCH_INDEXED_FIELD_NAME =
+      "batchIndexed"; // field name in summary tuple for #docs updated in batch

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/HashRollupStream.java
##########
@@ -49,103 +48,122 @@
   private Bucket[] buckets;
   private Metric[] metrics;
 
-
   private Iterator<Tuple> tupleIterator;
 
-  public HashRollupStream(TupleStream tupleStream,
-                      Bucket[] buckets,
-                      Metric[] metrics) {
+  public HashRollupStream(TupleStream tupleStream, Bucket[] buckets, Metric[] metrics) {
     init(tupleStream, buckets, metrics);
   }
 
   public HashRollupStream(StreamExpression expression, StreamFactory factory) throws IOException {
     // grab all parameters out
-    List<StreamExpression> streamExpressions = factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, TupleStream.class);
-    List<StreamExpression> metricExpressions = factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, Metric.class);
+    List<StreamExpression> streamExpressions =
+        factory.getExpressionOperandsRepresentingTypes(
+            expression, Expressible.class, TupleStream.class);
+    List<StreamExpression> metricExpressions =
+        factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, Metric.class);
     StreamExpressionNamedParameter overExpression = factory.getNamedOperand(expression, "over");
 
     // validate expression contains only what we want.
-    if(expression.getParameters().size() != streamExpressions.size() + metricExpressions.size() + 1){
-      throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - unknown operands found", expression));
+    if (expression.getParameters().size()
+        != streamExpressions.size() + metricExpressions.size() + 1) {
+      throw new IOException(
+          String.format(Locale.ROOT, "Invalid expression %s - unknown operands found", expression));
     }
 
-    if(1 != streamExpressions.size()){
-      throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - expecting a single stream but found %d",expression, streamExpressions.size()));
+    if (1 != streamExpressions.size()) {
+      throw new IOException(
+          String.format(
+              Locale.ROOT,
+              "Invalid expression %s - expecting a single stream but found %d",
+              expression,
+              streamExpressions.size()));
     }
 
-    if(null == overExpression || !(overExpression.getParameter() instanceof StreamExpressionValue)){
-      throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - expecting single 'over' parameter listing fields to rollup by but didn't find one",expression));
+    if (null == overExpression
+        || !(overExpression.getParameter() instanceof StreamExpressionValue)) {
+      throw new IOException(
+          String.format(
+              Locale.ROOT,
+              "Invalid expression %s - expecting single 'over' parameter listing fields to rollup by but didn't find one",
+              expression));
     }
 
     // Construct the metrics
     Metric[] metrics = new Metric[metricExpressions.size()];
-    for(int idx = 0; idx < metricExpressions.size(); ++idx){
+    for (int idx = 0; idx < metricExpressions.size(); ++idx) {
       metrics[idx] = factory.constructMetric(metricExpressions.get(idx));
     }
 
     // Construct the buckets.
-    // Buckets are nothing more than equalitors (I think). We can use equalitors as helpers for creating the buckets, but because
-    // I feel I'm missing something wrt buckets I don't want to change the use of buckets in this class to instead be equalitors.
-    StreamEqualitor streamEqualitor = factory.constructEqualitor(((StreamExpressionValue)overExpression.getParameter()).getValue(), FieldEqualitor.class);
+    // Buckets are nothing more than equalitors (I think). We can use equalitors as helpers for
+    // creating the buckets, but because
+    // I feel I'm missing something wrt buckets I don't want to change the use of buckets in this
+    // class to instead be equalitors.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/OuterHashJoinStream.java
##########
@@ -18,116 +18,121 @@
 
 import java.io.IOException;
 import java.util.List;
-
 import org.apache.solr.client.solrj.io.Tuple;
 import org.apache.solr.client.solrj.io.stream.expr.Expressible;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionNamedParameter;
 import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
 
 /**
- * Takes two streams (fullStream and hashStream) and joins them similar to an LeftOuterJoinStream. The difference
- * in a OuterHashJoinStream is that the tuples in the hashStream will all be read and hashed when this stream is
- * opened. This provides a few optimizations iff the hashStream has a relatively small number of documents.
- * The difference between this and a HashJoinStream is that a tuple in the fullStream will be returned even
- * if it doesn't have any matching tuples in the hashStream. 
- * You are expected to provide a set of fields for which the hash will be calculated from. If a tuple from the 
- * hashStream does not contain a value (ie, null) for one of the fields the hash is being computed on then that 
- * tuple will not be considered a match to anything. If a tuple from the fullStream does not contain a value (ie, null) 
- * for one of the fields the hash is being computed on then that tuple will be returned without any joined tuples
- * from the hashStream
+ * Takes two streams (fullStream and hashStream) and joins them similar to an LeftOuterJoinStream.
+ * The difference in a OuterHashJoinStream is that the tuples in the hashStream will all be read and
+ * hashed when this stream is opened. This provides a few optimizations iff the hashStream has a
+ * relatively small number of documents. The difference between this and a HashJoinStream is that a
+ * tuple in the fullStream will be returned even if it doesn't have any matching tuples in the
+ * hashStream. You are expected to provide a set of fields for which the hash will be calculated
+ * from. If a tuple from the hashStream does not contain a value (ie, null) for one of the fields
+ * the hash is being computed on then that tuple will not be considered a match to anything. If a
+ * tuple from the fullStream does not contain a value (ie, null) for one of the fields the hash is
+ * being computed on then that tuple will be returned without any joined tuples from the hashStream
+ *
  * @since 6.0.0
-**/
+ */
 public class OuterHashJoinStream extends HashJoinStream implements Expressible {
-  
+
   private static final long serialVersionUID = 1L;
 
-  public OuterHashJoinStream(TupleStream fullStream, TupleStream hashStream, List<String> hashOn) throws IOException {
+  public OuterHashJoinStream(TupleStream fullStream, TupleStream hashStream, List<String> hashOn)
+      throws IOException {
     super(fullStream, hashStream, hashOn);
   }
-  
-  public OuterHashJoinStream(StreamExpression expression,StreamFactory factory) throws IOException {
+
+  public OuterHashJoinStream(StreamExpression expression, StreamFactory factory)
+      throws IOException {
     super(expression, factory);
   }
-    
+
   @Override
-  public StreamExpression toExpression(StreamFactory factory) throws IOException {    
+  public StreamExpression toExpression(StreamFactory factory) throws IOException {
     // function name
     StreamExpression expression = new StreamExpression(factory.getFunctionName(this.getClass()));
-    
+
     // streams
-    if(hashStream instanceof Expressible && fullStream instanceof Expressible){
-      expression.addParameter(((Expressible)fullStream).toExpression(factory));
-      expression.addParameter(new StreamExpressionNamedParameter("hashed", ((Expressible)hashStream).toExpression(factory)));
+    if (hashStream instanceof Expressible && fullStream instanceof Expressible) {
+      expression.addParameter(((Expressible) fullStream).toExpression(factory));
+      expression.addParameter(
+          new StreamExpressionNamedParameter(
+              "hashed", ((Expressible) hashStream).toExpression(factory)));
+    } else {
+      throw new IOException(
+          "This OuterHashJoinStream contains a non-expressible TupleStream - it cannot be converted to an expression");
     }
-    else{
-      throw new IOException("This OuterHashJoinStream contains a non-expressible TupleStream - it cannot be converted to an expression");
-    }
-    
+
     // on
     StringBuilder sb = new StringBuilder();
-    for(int idx = 0; idx < leftHashOn.size(); ++idx){
-      if(sb.length() > 0){ sb.append(","); }
-      
+    for (int idx = 0; idx < leftHashOn.size(); ++idx) {
+      if (sb.length() > 0) {
+        sb.append(",");
+      }
+
       // we know that left and right hashOns are the same size
       String left = leftHashOn.get(idx);
       String right = rightHashOn.get(idx);
-      
-      if(left.equals(right)){ 
-        sb.append(left); 
-      }
-      else{
+
+      if (left.equals(right)) {
+        sb.append(left);
+      } else {
         sb.append(left);
         sb.append("=");
         sb.append(right);
       }
     }
-    expression.addParameter(new StreamExpressionNamedParameter("on",sb.toString()));
-    
-    return expression;   
+    expression.addParameter(new StreamExpressionNamedParameter("on", sb.toString()));
+
+    return expression;
   }
 
   public Tuple read() throws IOException {
-    
-    if(null == workingFullTuple){
+
+    if (null == workingFullTuple) {
       Tuple fullTuple = fullStream.read();
-      
+
       // We're at the end of the line
-      if(fullTuple.EOF){
+      if (fullTuple.EOF) {
         return fullTuple;
       }
-      
+
       // If fullTuple doesn't have a valid hash or the hash cannot be found in the hashedTuples then
       // return the tuple from fullStream.
-      // This is an outer join so there is no requirement there be a matching value in the hashed stream
+      // This is an outer join so there is no requirement there be a matching value in the hashed
+      // stream

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
##########
@@ -511,19 +523,27 @@ private HttpEntityEnclosingRequestBase fillContentStream(
       }
       postOrPut.setEntity(entity);
     } else {
-      //not using multipart
+      // not using multipart
       postOrPut.setEntity(new UrlEncodedFormEntity(postOrPutParams, StandardCharsets.UTF_8));
     }
     return postOrPut;
   }
 
-  private static final List<String> errPath = Arrays.asList("metadata", "error-class");//Utils.getObjectByPath(err, false,"metadata/error-class")
+  private static final List<String> errPath =
+      Arrays.asList(
+          "metadata", "error-class"); // Utils.getObjectByPath(err, false,"metadata/error-class")

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/expr/StreamFactory.java
##########
@@ -182,28 +191,33 @@ public StreamExpressionNamedParameter getNamedOperand(StreamExpression expressio
     return namedParameters;
   }
 
-  public List<StreamExpressionParameter> getOperandsOfType(StreamExpression expression, Class<?>... clazzes) {
+  public List<StreamExpressionParameter> getOperandsOfType(
+      StreamExpression expression, Class<?>... clazzes) {
     List<StreamExpressionParameter> parameters = new ArrayList<>();
-    
+
     parameterLoop:
-     for (StreamExpressionParameter parameter : expression.getParameters()) {
+    for (StreamExpressionParameter parameter : expression.getParameters()) {
       for (Class<?> clazz : clazzes) {
         if (!clazz.isAssignableFrom(parameter.getClass())) {
-          continue parameterLoop; // go to the next parameter since this parameter cannot be assigned to at least one of the classes
+          continue
+              parameterLoop; // go to the next parameter since this parameter cannot be assigned to
+          // at least one of the classes

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/response/FieldAnalysisResponse.java
##########
@@ -127,43 +122,38 @@ public Analysis getFieldNameAnalysis(String fieldName) {
     return analysisByFieldName.entrySet();
   }
 
-
-  //================================================= Inner Classes ==================================================
+  // ================================================= Inner Classes
+  // ==================================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SelectStream.java
##########
@@ -251,49 +282,51 @@ public void close() throws IOException {
 
   public Tuple read() throws IOException {
     Tuple original = stream.read();
-    
-    if(original.EOF){
+
+    if (original.EOF) {
       return original;
     }
 
     // create a copy with the limited set of fields
     Tuple workingToReturn = new Tuple();
     Tuple workingForEvaluators = new Tuple();
 
-    //Clear the TupleContext before running the evaluators.
-    //The TupleContext allows evaluators to cache values within the scope of a single tuple.
-    //For example a LocalDateTime could be parsed by one evaluator and used by other evaluators within the scope of the tuple.
-    //This avoids the need to create multiple LocalDateTime instances for the same tuple to satisfy a select expression.
+    // Clear the TupleContext before running the evaluators.
+    // The TupleContext allows evaluators to cache values within the scope of a single tuple.
+    // For example a LocalDateTime could be parsed by one evaluator and used by other evaluators
+    // within the scope of the tuple.
+    // This avoids the need to create multiple LocalDateTime instances for the same tuple to satisfy
+    // a select expression.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/request/beans/CreateCorePayload.java
##########
@@ -17,67 +17,51 @@
 
 package org.apache.solr.client.solrj.request.beans;
 
-import org.apache.solr.common.annotation.JsonProperty;
-import org.apache.solr.common.util.ReflectMapWriter;
-
 import java.util.List;
 import java.util.Map;
+import org.apache.solr.common.annotation.JsonProperty;
+import org.apache.solr.common.util.ReflectMapWriter;
 
 public class CreateCorePayload implements ReflectMapWriter {
-    @JsonProperty(required = true)
-    public String name;
+  @JsonProperty(required = true)
+  public String name;
 
-    @JsonProperty
-    public String instanceDir;
+  @JsonProperty public String instanceDir;
 
-    @JsonProperty
-    public String dataDir;
+  @JsonProperty public String dataDir;
 
-    @JsonProperty
-    public String ulogDir;
+  @JsonProperty public String ulogDir;
 
-    @JsonProperty
-    public String schema;
+  @JsonProperty public String schema;
 
-    @JsonProperty
-    public String config;
+  @JsonProperty public String config;
 
-    @JsonProperty
-    public String configSet;
+  @JsonProperty public String configSet;
 
-    @JsonProperty
-    public Boolean loadOnStartup;
+  @JsonProperty public Boolean loadOnStartup;
 
-    // If our JsonProperty clone was more feature-rich here we could specify the property be called 'transient', but
-    // without that support it needs to be named something else to avoid conflicting with the 'transient' keyword in Java
-    @JsonProperty
-    public Boolean isTransient;
+  // If our JsonProperty clone was more feature-rich here we could specify the property be called
+  // 'transient', but
+  // without that support it needs to be named something else to avoid conflicting with the
+  // 'transient' keyword in Java

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/RollupStream.java
##########
@@ -48,127 +47,146 @@
   private PushBackStream tupleStream;
   private Bucket[] buckets;
   private Metric[] metrics;
-  
+
   private HashKey currentKey = new HashKey("-");
   private Metric[] currentMetrics;
   private boolean finished = false;
 
-  public RollupStream(TupleStream tupleStream,
-                      Bucket[] buckets,
-                      Metric[] metrics) {
+  public RollupStream(TupleStream tupleStream, Bucket[] buckets, Metric[] metrics) {
     init(tupleStream, buckets, metrics);
   }
-  
+
   public RollupStream(StreamExpression expression, StreamFactory factory) throws IOException {
     // grab all parameters out
-    List<StreamExpression> streamExpressions = factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, TupleStream.class);
-    List<StreamExpression> metricExpressions = factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, Metric.class);
+    List<StreamExpression> streamExpressions =
+        factory.getExpressionOperandsRepresentingTypes(
+            expression, Expressible.class, TupleStream.class);
+    List<StreamExpression> metricExpressions =
+        factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, Metric.class);
     StreamExpressionNamedParameter overExpression = factory.getNamedOperand(expression, "over");
-    
+
     // validate expression contains only what we want.
-    if(expression.getParameters().size() != streamExpressions.size() + metricExpressions.size() + 1){
-      throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - unknown operands found", expression));
+    if (expression.getParameters().size()
+        != streamExpressions.size() + metricExpressions.size() + 1) {
+      throw new IOException(
+          String.format(Locale.ROOT, "Invalid expression %s - unknown operands found", expression));
     }
-    
-    if(1 != streamExpressions.size()){
-      throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - expecting a single stream but found %d",expression, streamExpressions.size()));
+
+    if (1 != streamExpressions.size()) {
+      throw new IOException(
+          String.format(
+              Locale.ROOT,
+              "Invalid expression %s - expecting a single stream but found %d",
+              expression,
+              streamExpressions.size()));
     }
 
-    if(null == overExpression || !(overExpression.getParameter() instanceof StreamExpressionValue)){
-      throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - expecting single 'over' parameter listing fields to rollup by but didn't find one",expression));
+    if (null == overExpression
+        || !(overExpression.getParameter() instanceof StreamExpressionValue)) {
+      throw new IOException(
+          String.format(
+              Locale.ROOT,
+              "Invalid expression %s - expecting single 'over' parameter listing fields to rollup by but didn't find one",
+              expression));
     }
-    
+
     // Construct the metrics
     Metric[] metrics = new Metric[metricExpressions.size()];
-    for(int idx = 0; idx < metricExpressions.size(); ++idx){
+    for (int idx = 0; idx < metricExpressions.size(); ++idx) {
       metrics[idx] = factory.constructMetric(metricExpressions.get(idx));
     }
-    
+
     // Construct the buckets.
-    // Buckets are nothing more than equalitors (I think). We can use equalitors as helpers for creating the buckets, but because
-    // I feel I'm missing something wrt buckets I don't want to change the use of buckets in this class to instead be equalitors.    
-    StreamEqualitor streamEqualitor = factory.constructEqualitor(((StreamExpressionValue)overExpression.getParameter()).getValue(), FieldEqualitor.class);
+    // Buckets are nothing more than equalitors (I think). We can use equalitors as helpers for
+    // creating the buckets, but because
+    // I feel I'm missing something wrt buckets I don't want to change the use of buckets in this
+    // class to instead be equalitors.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/response/DocumentAnalysisResponse.java
##########
@@ -104,7 +101,8 @@ public DocumentAnalysis getDocumentAnalysis(String documentKey) {
     return documentAnalysisByKey.entrySet().iterator();
   }
 
-  //================================================= Inner Classes ==================================================
+  // ================================================= Inner Classes
+  // ==================================================

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/Aliases.java
##########
@@ -27,29 +27,29 @@
 import java.util.function.BiConsumer;
 import java.util.function.UnaryOperator;
 import java.util.stream.Collectors;
-
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.CollectionAdminParams;
 import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.common.util.Utils;
 
 /**
- * Holds collection aliases -- virtual collections that point to one or more other collections.
- * We might add other types of aliases here some day.
- * Immutable.
+ * Holds collection aliases -- virtual collections that point to one or more other collections. We
+ * might add other types of aliases here some day. Immutable.
  */
 public class Aliases {
 
   /**
-   * An empty, minimal Aliases primarily used to support the non-cloud solr use cases. Not normally useful
-   * in cloud situations where the version of the node needs to be tracked even if all aliases are removed.
-   * The -1 version makes it subordinate to any real version, and furthermore we never "set" this EMPTY instance
-   * into ZK.
+   * An empty, minimal Aliases primarily used to support the non-cloud solr use cases. Not normally
+   * useful in cloud situations where the version of the node needs to be tracked even if all
+   * aliases are removed. The -1 version makes it subordinate to any real version, and furthermore
+   * we never "set" this EMPTY instance into ZK.
    */
-  public static final Aliases EMPTY = new Aliases(Collections.emptyMap(), Collections.emptyMap(), -1);
+  public static final Aliases EMPTY =
+      new Aliases(Collections.emptyMap(), Collections.emptyMap(), -1);
 
   // These two constants correspond to the top level elements in aliases.json. The first one denotes
-  // a section containing a list of aliases and their attendant collections, the second contains a list of
+  // a section containing a list of aliases and their attendant collections, the second contains a
+  // list of
   // aliases and their attendant properties (metadata) They probably should be
   // named "aliases" and "alias_properties" but for back compat reasons, we cannot change them

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CloudSolrStream.java
##########
@@ -231,9 +248,12 @@ void init(String collectionName, String zkHost, SolrParams params) throws IOExce
     this.collection = collectionName;
     this.params = new ModifiableSolrParams(params);
 
-    // If the comparator is null then it was not explicitly set so we will create one using the sort parameter
-    // of the query. While doing this we will also take into account any aliases such that if we are sorting on
-    // fieldA but fieldA is aliased to alias.fieldA then the comparator will be against alias.fieldA.
+    // If the comparator is null then it was not explicitly set so we will create one using the sort
+    // parameter
+    // of the query. While doing this we will also take into account any aliases such that if we are
+    // sorting on
+    // fieldA but fieldA is aliased to alias.fieldA then the comparator will be against
+    // alias.fieldA.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/DocRouter.java
##########
@@ -154,10 +156,13 @@ public int compareTo(Range that) {
   public Range fromString(String range) {
     int middle = range.indexOf('-');
     String minS = range.substring(0, middle);
-    String maxS = range.substring(middle+1);
-    long min = Long.parseLong(minS, 16);  // use long to prevent the parsing routines from potentially worrying about overflow
+    String maxS = range.substring(middle + 1);
+    long min =
+        Long.parseLong(
+            minS, 16); // use long to prevent the parsing routines from potentially worrying about
+    // overflow

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ConnectionManager.java
##########
@@ -146,11 +172,14 @@ public void process(WatchedEvent event) {
       }
 
       do {
-        // This loop will break if a valid connection is made. If a connection is not made then it will repeat and
+        // This loop will break if a valid connection is made. If a connection is not made then it
+        // will repeat and
         // try again to create a new connection.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/Slice.java
##########
@@ -129,60 +129,66 @@ public static State getState(String stateStr) {
 
   public static final String REPLICAS = "replicas";
   public static final String RANGE = "range";
-  public static final String LEADER = "leader";       // FUTURE: do we want to record the leader as a slice property in the JSON (as opposed to isLeader as a replica property?)
+  public static final String LEADER =
+      "leader"; // FUTURE: do we want to record the leader as a slice property in the JSON (as
+  // opposed to isLeader as a replica property?)
   public static final String PARENT = "parent";
 
   private final String name;
   private final DocRouter.Range range;
-  private final Integer replicationFactor;      // FUTURE: optional per-slice override of the collection replicationFactor
-  private final Map<String,Replica> replicas;
+  private final Integer
+      replicationFactor; // FUTURE: optional per-slice override of the collection replicationFactor

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
##########
@@ -142,13 +160,14 @@ public static void zkTransfer(SolrZkClient zkClient, String src, Boolean srcIsZk
       return;
     }
 
-    //local -> ZK copy
+    // local -> ZK copy
     if (dstIsZk) {
       uploadToZK(zkClient, Paths.get(src), dst, null);
       return;
     }
 
-    // Copying individual files from ZK requires special handling since downloadFromZK assumes the node has children.
+    // Copying individual files from ZK requires special handling since downloadFromZK assumes the
+    // node has children.
     // This is kind of a weak test for the notion of "directory" on Zookeeper.
     // ZK -> local copy where ZK is a parent node

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/VMParamsAllAndReadonlyDigestZkACLProvider.java
##########
@@ -80,46 +86,65 @@ public VMParamsAllAndReadonlyDigestZkACLProvider(String zkDigestAllUsernameVMPar
   protected List<ACL> createACLsToAdd(boolean includeReadOnly) {
     String digestAllUsername = credentialsProps.getProperty(zkDigestAllUsernameVMParamName);
     String digestAllPassword = credentialsProps.getProperty(zkDigestAllPasswordVMParamName);
-    String digestReadonlyUsername = credentialsProps.getProperty(zkDigestReadonlyUsernameVMParamName);
-    String digestReadonlyPassword = credentialsProps.getProperty(zkDigestReadonlyPasswordVMParamName);
+    String digestReadonlyUsername =
+        credentialsProps.getProperty(zkDigestReadonlyUsernameVMParamName);
+    String digestReadonlyPassword =
+        credentialsProps.getProperty(zkDigestReadonlyPasswordVMParamName);
 
-    return createACLsToAdd(includeReadOnly,
-        digestAllUsername, digestAllPassword,
-        digestReadonlyUsername, digestReadonlyPassword);
+    return createACLsToAdd(
+        includeReadOnly,
+        digestAllUsername,
+        digestAllPassword,
+        digestReadonlyUsername,
+        digestReadonlyPassword);
   }
 
-  /**
-   * Note: only used for tests
-   */
-  protected List<ACL> createACLsToAdd(boolean includeReadOnly,
-                                      String digestAllUsername, String digestAllPassword,
-                                      String digestReadonlyUsername, String digestReadonlyPassword) {
+  /** Note: only used for tests */
+  protected List<ACL> createACLsToAdd(
+      boolean includeReadOnly,
+      String digestAllUsername,
+      String digestAllPassword,
+      String digestReadonlyUsername,
+      String digestReadonlyPassword) {
 
-      try {
+    try {
       List<ACL> result = new ArrayList<>(2);
-  
-      // Not to have to provide too much credentials and ACL information to the process it is assumed that you want "ALL"-acls
-      // added to the user you are using to connect to ZK (if you are using VMParamsSingleSetCredentialsDigestZkCredentialsProvider)
+
+      // Not to have to provide too much credentials and ACL information to the process it is
+      // assumed that you want "ALL"-acls
+      // added to the user you are using to connect to ZK (if you are using
+      // VMParamsSingleSetCredentialsDigestZkCredentialsProvider)

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/response/json/BucketBasedJsonFacet.java
##########
@@ -63,33 +63,34 @@ public BucketBasedJsonFacet(NamedList<?> bucketBasedFacet) {
       } else if ("numBuckets".equals(key)) {
         numBuckets = ((Number) value).longValue();
       } else if ("allBuckets".equals(key)) {
-        allBuckets = ((Number) ((NamedList)value).get("count")).longValue();
+        allBuckets = ((Number) ((NamedList) value).get("count")).longValue();
       } else if ("before".equals(key)) {
-        beforeFirstBucketCount = ((Number) ((NamedList)value).get("count")).longValue();
+        beforeFirstBucketCount = ((Number) ((NamedList) value).get("count")).longValue();
       } else if ("after".equals(key)) {
-        afterLastBucketCount = ((Number) ((NamedList)value).get("count")).longValue();
+        afterLastBucketCount = ((Number) ((NamedList) value).get("count")).longValue();
       } else if ("between".equals(key)) {
-        betweenAllBucketsCount = ((Number) ((NamedList)value).get("count")).longValue();
+        betweenAllBucketsCount = ((Number) ((NamedList) value).get("count")).longValue();
       } else {
-        // We don't recognize the key.  Possible JSON faceting schema has changed without updating client.
-        // Silently ignore for now, though we may want to consider throwing an error if this proves problematic.
+        // We don't recognize the key.  Possible JSON faceting schema has changed without updating
+        // client.
+        // Silently ignore for now, though we may want to consider throwing an error if this proves
+        // problematic.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
##########
@@ -356,13 +416,15 @@ private static int copyDataDown(SolrZkClient zkClient, String zkPath, Path file)
     return 0;
   }
 
-  public static void downloadFromZK(SolrZkClient zkClient, String zkPath, Path file) throws IOException {
+  public static void downloadFromZK(SolrZkClient zkClient, String zkPath, Path file)
+      throws IOException {
     try {
       List<String> children = zkClient.getChildren(zkPath, null, true);
       // If it has no children, it's a leaf node, write the associated data from the ZNode.
       // Otherwise, continue recursing, but write the associated data to a special file if any
       if (children.size() == 0) {
-        // If we didn't copy data down, then we also didn't create the file. But we still need a marker on the local
+        // If we didn't copy data down, then we also didn't create the file. But we still need a
+        // marker on the local
         // disk so create an empty file.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
##########
@@ -179,7 +199,9 @@ private static String normalizeDest(String srcName, String dstName, boolean srcI
     String dstSeparator = (dstIsZk) ? "/" : File.separator;
     String srcSeparator = (srcIsZk) ? "/" : File.separator;
 
-    if (dstName.endsWith(dstSeparator)) { // Dest is a directory or non-leaf znode, append last element of the src path.
+    if (dstName.endsWith(
+        dstSeparator)) { // Dest is a directory or non-leaf znode, append last element of the src
+      // path.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkDynamicConfig.java
##########
@@ -23,60 +23,75 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
-
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.StringUtils;
 
 /**
- * Class holding the dynamic config of a Zookeeper ensemble as fetched from znode <code>/zookeeper/config</code>.
+ * Class holding the dynamic config of a Zookeeper ensemble as fetched from znode <code>
+ * /zookeeper/config</code>.
  */
 public class ZkDynamicConfig {
-  // server.<positive id> = <address1>:<port1>:<port2>[:role][|<address2>:<port2>...];[<client port address>:]<client port>
-  // TODO: Add support for handling multiple address specs per server line, how we simply ignore all but the first
-  public static final Pattern linePattern = Pattern.compile("server\\.(?<serverId>\\d+) ?= ?(?<address>[^:]+):(?<leaderPort>\\d+):(?<leaderElectionPort>\\d+)(:(?<role>.*?))?(\\|.*?)?(;((?<clientPortAddress>.*?):)?(?<clientPort>\\d+))?");
+  // server.<positive id> = <address1>:<port1>:<port2>[:role][|<address2>:<port2>...];[<client port
+  // address>:]<client port>
+  // TODO: Add support for handling multiple address specs per server line, how we simply ignore all
+  // but the first

Review comment:
       Fix this?

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
##########
@@ -204,58 +227,71 @@ public static void moveZnode(SolrZkClient zkClient, String src, String dst) thro
     }
 
     // Insure all source znodes are present in dest before deleting the source.
-    // throws error if not all there so the source is left intact. Throws error if source and dest don't match.
+    // throws error if not all there so the source is left intact. Throws error if source and dest
+    // don't match.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -1055,14 +1129,19 @@ private void loadClusterProperties() {
             vcp.cacheUntilNs = untilNs;
             watchedCollectionProps.put(collection, vcp);
           } else {
-            // we're synchronized on watchedCollectionProps and we can only get here if we have found an expired
-            // vprops above, so it is safe to remove the cached value and let the GC free up some mem a bit sooner.
+            // we're synchronized on watchedCollectionProps and we can only get here if we have
+            // found an expired
+            // vprops above, so it is safe to remove the cached value and let the GC free up some
+            // mem a bit sooner.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -1102,13 +1182,17 @@ private VersionedCollectionProps fetchCollectionProperties(String collection, Wa
         Map<String, String> props = (Map<String, String>) Utils.fromJSON(data);
         return new VersionedCollectionProps(stat.getVersion(), props);
       } catch (ClassCastException e) {
-        throw new SolrException(ErrorCode.SERVER_ERROR, "Unable to parse collection properties for collection " + collection, e);
+        throw new SolrException(
+            ErrorCode.SERVER_ERROR,
+            "Unable to parse collection properties for collection " + collection,
+            e);
       } catch (KeeperException.NoNodeException e) {
         if (watcher != null) {
           // Leave an exists watch in place in case a collectionprops.json is created later.
           Stat exists = zkClient.exists(znodePath, watcher, true);
           if (exists != null) {
-            // Rare race condition, we tried to fetch the data and couldn't find it, then we found it exists.
+            // Rare race condition, we tried to fetch the data and couldn't find it, then we found
+            // it exists.
             // Loop and try again.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -1449,7 +1561,8 @@ private DocCollection fetchCollectionState(String coll, Watcher watcher) throws
           // Leave an exists watch in place in case a state.json is created later.
           Stat exists = zkClient.exists(collectionPath, watcher, true);
           if (exists != null) {
-            // Rare race condition, we tried to fetch the data and couldn't find it, then we found it exists.
+            // Rare race condition, we tried to fetch the data and couldn't find it, then we found
+            // it exists.
             // Loop and try again.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -1315,30 +1410,33 @@ void refreshAndWatch(boolean notifyWatchers) {
               watchedCollectionProps.remove(coll);
 
               // core ref counting not relevant here, don't need canRemove(), we just sent
-              // a notification of an empty set of properties, no reason to watch what doesn't exist.
+              // a notification of an empty set of properties, no reason to watch what doesn't
+              // exist.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/params/GroupParams.java
##########
@@ -32,23 +30,27 @@
   /** the offset for the doclist of each group */
   public static final String GROUP_OFFSET = GROUP + ".offset";
 
-  /** treat the first group result as the main result.  true/false */
+  /** treat the first group result as the main result. true/false */
   public static final String GROUP_MAIN = GROUP + ".main";
 
-  /** treat the first group result as the main result.  true/false */
+  /** treat the first group result as the main result. true/false */
   public static final String GROUP_FORMAT = GROUP + ".format";
 
   /**
-   * Whether to cache the first pass search (doc ids and score) for the second pass search.
-   * Also defines the maximum size of the group cache relative to maxdoc in a percentage.
-   * Values can be a positive integer, from 0 till 100. A value of 0 will disable the group cache.
-   * The default is 0.*/
+   * Whether to cache the first pass search (doc ids and score) for the second pass search. Also
+   * defines the maximum size of the group cache relative to maxdoc in a percentage. Values can be a
+   * positive integer, from 0 till 100. A value of 0 will disable the group cache. The default is 0.
+   */
   public static final String GROUP_CACHE_PERCENTAGE = GROUP + ".cache.percent";
 
-  // Note: Since you can supply multiple fields to group on, but only have a facets for the whole result. It only makes
+  // Note: Since you can supply multiple fields to group on, but only have a facets for the whole
+  // result. It only makes
   // sense to me to support these parameters for the first group.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -1315,30 +1410,33 @@ void refreshAndWatch(boolean notifyWatchers) {
               watchedCollectionProps.remove(coll);
 
               // core ref counting not relevant here, don't need canRemove(), we just sent
-              // a notification of an empty set of properties, no reason to watch what doesn't exist.
+              // a notification of an empty set of properties, no reason to watch what doesn't
+              // exist.
               collectionPropsObservers.remove(coll);
 
-              // This is the one time we know it's safe to throw this out. We just failed to set the watch
-              // due to an NoNodeException, so it isn't held by ZK and can't re-set itself due to an update.
+              // This is the one time we know it's safe to throw this out. We just failed to set the
+              // watch
+              // due to an NoNodeException, so it isn't held by ZK and can't re-set itself due to an
+              // update.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
##########
@@ -147,324 +133,330 @@
   public static final String FACET_SORT_INDEX = "index";
   public static final String FACET_SORT_INDEX_LEGACY = "false";
 
-  /**
-   * Only return constraints of a facet field with the given prefix.
-   */
+  /** Only return constraints of a facet field with the given prefix. */
   public static final String FACET_PREFIX = FACET + ".prefix";
 
-  /**
-   * Only return constraints of a facet field containing the given string.
-   */
+  /** Only return constraints of a facet field containing the given string. */
   public static final String FACET_CONTAINS = FACET + ".contains";
 
-  /**
-   * Only return constraints of a facet field containing the given string.
-   */
+  /** Only return constraints of a facet field containing the given string. */
   public static final String FACET_MATCHES = FACET + ".matches";
 
-  /**
-   * If using facet contains, ignore case when comparing values.
-   */
+  /** If using facet contains, ignore case when comparing values. */
   public static final String FACET_CONTAINS_IGNORE_CASE = FACET_CONTAINS + ".ignoreCase";
 
-  /**
-   * Only return constraints of a facet field excluding the given string.
-   */
+  /** Only return constraints of a facet field excluding the given string. */
   public static final String FACET_EXCLUDETERMS = FACET + ".excludeTerms";
 
- /**
-   * When faceting by enumerating the terms in a field,
-   * only use the filterCache for terms with a df &gt;= to this parameter.
+  /**
+   * When faceting by enumerating the terms in a field, only use the filterCache for terms with a df
+   * &gt;= to this parameter.
    */
   public static final String FACET_ENUM_CACHE_MINDF = FACET + ".enum.cache.minDf";
-  
+
   /**
-   *  A boolean parameter that caps the facet counts at 1. 
-   *  With this set, a returned count will only be 0 or 1. 
-   *  For apps that don't need the count, this should be an optimization
+   * A boolean parameter that caps the facet counts at 1. With this set, a returned count will only
+   * be 0 or 1. For apps that don't need the count, this should be an optimization
    */
-  public static final String FACET_EXISTS = FACET+".exists";
-  
+  public static final String FACET_EXISTS = FACET + ".exists";
+
   /**
-   * Any field whose terms the user wants to enumerate over for
-   * Facet Contraint Counts (multi-value)
+   * Any field whose terms the user wants to enumerate over for Facet Contraint Counts (multi-value)
    */
   public static final String FACET_DATE = FACET + ".date";
   /**
-   * Date string indicating the starting point for a date facet range.
-   * Can be overridden on a per field basis.
+   * Date string indicating the starting point for a date facet range. Can be overridden on a per
+   * field basis.
    */
   public static final String FACET_DATE_START = FACET_DATE + ".start";
   /**
-   * Date string indicating the ending point for a date facet range.
-   * Can be overridden on a per field basis.
+   * Date string indicating the ending point for a date facet range. Can be overridden on a per
+   * field basis.
    */
   public static final String FACET_DATE_END = FACET_DATE + ".end";
   /**
-   * Date Math string indicating the interval of sub-ranges for a date
-   * facet range.
-   * Can be overridden on a per field basis.
+   * Date Math string indicating the interval of sub-ranges for a date facet range. Can be
+   * overridden on a per field basis.
    */
   public static final String FACET_DATE_GAP = FACET_DATE + ".gap";
   /**
-   * Boolean indicating how counts should be computed if the range
-   * between 'start' and 'end' is not evenly divisible by 'gap'.  If
-   * this value is true, then all counts of ranges involving the 'end'
-   * point will use the exact endpoint specified -- this includes the
-   * 'between' and 'after' counts as well as the last range computed
-   * using the 'gap'.  If the value is false, then 'gap' is used to
-   * compute the effective endpoint closest to the 'end' param which
-   * results in the range between 'start' and 'end' being evenly
-   * divisible by 'gap'.
-   * The default is false.
-   * Can be overridden on a per field basis.
+   * Boolean indicating how counts should be computed if the range between 'start' and 'end' is not
+   * evenly divisible by 'gap'. If this value is true, then all counts of ranges involving the 'end'
+   * point will use the exact endpoint specified -- this includes the 'between' and 'after' counts
+   * as well as the last range computed using the 'gap'. If the value is false, then 'gap' is used
+   * to compute the effective endpoint closest to the 'end' param which results in the range between
+   * 'start' and 'end' being evenly divisible by 'gap'. The default is false. Can be overridden on a
+   * per field basis.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -2030,32 +2153,42 @@ public void applyModificationAndExportToZk(UnaryOperator<Aliases> op) {
       final long deadlineNanos = System.nanoTime() + TimeUnit.SECONDS.toNanos(30);
       // note: triesLeft tuning is based on ConcurrentCreateRoutedAliasTest
       for (int triesLeft = 30; triesLeft > 0; triesLeft--) {
-        // we could synchronize on "this" but there doesn't seem to be a point; we have a retry loop.
+        // we could synchronize on "this" but there doesn't seem to be a point; we have a retry
+        // loop.
         Aliases curAliases = getAliases();
         Aliases modAliases = op.apply(curAliases);
         final byte[] modAliasesJson = modAliases.toJSON();
         if (curAliases == modAliases) {
-          log.debug("Current aliases has the desired modification; no further ZK interaction needed.");
+          log.debug(
+              "Current aliases has the desired modification; no further ZK interaction needed.");
           return;
         }
 
         try {
           try {
-            final Stat stat = getZkClient().setData(ALIASES, modAliasesJson, curAliases.getZNodeVersion(), true);
+            final Stat stat =
+                getZkClient().setData(ALIASES, modAliasesJson, curAliases.getZNodeVersion(), true);
             setIfNewer(Aliases.fromJSON(modAliasesJson, stat.getVersion()));
             return;
           } catch (KeeperException.BadVersionException e) {
             log.debug("{}", e, e);
-            log.warn("Couldn't save aliases due to race with another modification; will update and retry until timeout");
-            // considered a backoff here, but we really do want to compete strongly since the normal case is
-            // that we will do one update and succeed. This is left as a hot loop for limited tries intentionally.
-            // More failures than that here probably indicate a bug or a very strange high write frequency usage for
-            // aliases.json, timeouts mean zk is being very slow to respond, or this node is being crushed
+            log.warn(
+                "Couldn't save aliases due to race with another modification; will update and retry until timeout");
+            // considered a backoff here, but we really do want to compete strongly since the normal
+            // case is
+            // that we will do one update and succeed. This is left as a hot loop for limited tries
+            // intentionally.
+            // More failures than that here probably indicate a bug or a very strange high write
+            // frequency usage for
+            // aliases.json, timeouts mean zk is being very slow to respond, or this node is being
+            // crushed
             // by other processing and just can't find any cpu cycles at all.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
##########
@@ -147,324 +133,330 @@
   public static final String FACET_SORT_INDEX = "index";
   public static final String FACET_SORT_INDEX_LEGACY = "false";
 
-  /**
-   * Only return constraints of a facet field with the given prefix.
-   */
+  /** Only return constraints of a facet field with the given prefix. */
   public static final String FACET_PREFIX = FACET + ".prefix";
 
-  /**
-   * Only return constraints of a facet field containing the given string.
-   */
+  /** Only return constraints of a facet field containing the given string. */
   public static final String FACET_CONTAINS = FACET + ".contains";
 
-  /**
-   * Only return constraints of a facet field containing the given string.
-   */
+  /** Only return constraints of a facet field containing the given string. */
   public static final String FACET_MATCHES = FACET + ".matches";
 
-  /**
-   * If using facet contains, ignore case when comparing values.
-   */
+  /** If using facet contains, ignore case when comparing values. */
   public static final String FACET_CONTAINS_IGNORE_CASE = FACET_CONTAINS + ".ignoreCase";
 
-  /**
-   * Only return constraints of a facet field excluding the given string.
-   */
+  /** Only return constraints of a facet field excluding the given string. */
   public static final String FACET_EXCLUDETERMS = FACET + ".excludeTerms";
 
- /**
-   * When faceting by enumerating the terms in a field,
-   * only use the filterCache for terms with a df &gt;= to this parameter.
+  /**
+   * When faceting by enumerating the terms in a field, only use the filterCache for terms with a df
+   * &gt;= to this parameter.
    */
   public static final String FACET_ENUM_CACHE_MINDF = FACET + ".enum.cache.minDf";
-  
+
   /**
-   *  A boolean parameter that caps the facet counts at 1. 
-   *  With this set, a returned count will only be 0 or 1. 
-   *  For apps that don't need the count, this should be an optimization
+   * A boolean parameter that caps the facet counts at 1. With this set, a returned count will only
+   * be 0 or 1. For apps that don't need the count, this should be an optimization
    */
-  public static final String FACET_EXISTS = FACET+".exists";
-  
+  public static final String FACET_EXISTS = FACET + ".exists";
+
   /**
-   * Any field whose terms the user wants to enumerate over for
-   * Facet Contraint Counts (multi-value)
+   * Any field whose terms the user wants to enumerate over for Facet Contraint Counts (multi-value)
    */
   public static final String FACET_DATE = FACET + ".date";
   /**
-   * Date string indicating the starting point for a date facet range.
-   * Can be overridden on a per field basis.
+   * Date string indicating the starting point for a date facet range. Can be overridden on a per
+   * field basis.
    */
   public static final String FACET_DATE_START = FACET_DATE + ".start";
   /**
-   * Date string indicating the ending point for a date facet range.
-   * Can be overridden on a per field basis.
+   * Date string indicating the ending point for a date facet range. Can be overridden on a per
+   * field basis.
    */
   public static final String FACET_DATE_END = FACET_DATE + ".end";
   /**
-   * Date Math string indicating the interval of sub-ranges for a date
-   * facet range.
-   * Can be overridden on a per field basis.
+   * Date Math string indicating the interval of sub-ranges for a date facet range. Can be
+   * overridden on a per field basis.
    */
   public static final String FACET_DATE_GAP = FACET_DATE + ".gap";
   /**
-   * Boolean indicating how counts should be computed if the range
-   * between 'start' and 'end' is not evenly divisible by 'gap'.  If
-   * this value is true, then all counts of ranges involving the 'end'
-   * point will use the exact endpoint specified -- this includes the
-   * 'between' and 'after' counts as well as the last range computed
-   * using the 'gap'.  If the value is false, then 'gap' is used to
-   * compute the effective endpoint closest to the 'end' param which
-   * results in the range between 'start' and 'end' being evenly
-   * divisible by 'gap'.
-   * The default is false.
-   * Can be overridden on a per field basis.
+   * Boolean indicating how counts should be computed if the range between 'start' and 'end' is not
+   * evenly divisible by 'gap'. If this value is true, then all counts of ranges involving the 'end'
+   * point will use the exact endpoint specified -- this includes the 'between' and 'after' counts
+   * as well as the last range computed using the 'gap'. If the value is false, then 'gap' is used
+   * to compute the effective endpoint closest to the 'end' param which results in the range between
+   * 'start' and 'end' being evenly divisible by 'gap'. The default is false. Can be overridden on a
+   * per field basis.
    */
   public static final String FACET_DATE_HARD_END = FACET_DATE + ".hardend";
   /**
-   * String indicating what "other" ranges should be computed for a
-   * date facet range (multi-value).
+   * String indicating what "other" ranges should be computed for a date facet range (multi-value).
    * Can be overridden on a per field basis.
+   *
    * @see FacetRangeOther
    */
   public static final String FACET_DATE_OTHER = FACET_DATE + ".other";
 
   /**
-   * <p>
-   * Multivalued string indicating what rules should be applied to determine 
-   * when the ranges generated for date faceting should be inclusive or 
-   * exclusive of their end points.
-   * </p>
-   * <p>
-   * The default value if none are specified is: [lower,upper,edge] <i>(NOTE: This is different then FACET_RANGE_INCLUDE)</i>
-   * </p>
-   * <p>
-   * Can be overridden on a per field basis.
-   * </p>
+   * Multivalued string indicating what rules should be applied to determine when the ranges
+   * generated for date faceting should be inclusive or exclusive of their end points.
+   *
+   * <p>The default value if none are specified is: [lower,upper,edge] <i>(NOTE: This is different
+   * then FACET_RANGE_INCLUDE)</i>
+   *
+   * <p>Can be overridden on a per field basis.
+   *
    * @see FacetRangeInclude
    * @see #FACET_RANGE_INCLUDE
    */
   public static final String FACET_DATE_INCLUDE = FACET_DATE + ".include";
 
   /**
-   * Any numerical field whose terms the user wants to enumerate over
-   * Facet Contraint Counts for selected ranges.
+   * Any numerical field whose terms the user wants to enumerate over Facet Contraint Counts for
+   * selected ranges.
    */
   public static final String FACET_RANGE = FACET + ".range";
   /**
-   * Number indicating the starting point for a numerical range facet.
-   * Can be overridden on a per field basis.
+   * Number indicating the starting point for a numerical range facet. Can be overridden on a per
+   * field basis.
    */
   public static final String FACET_RANGE_START = FACET_RANGE + ".start";
   /**
-   * Number indicating the ending point for a numerical range facet.
-   * Can be overridden on a per field basis.
+   * Number indicating the ending point for a numerical range facet. Can be overridden on a per
+   * field basis.
    */
   public static final String FACET_RANGE_END = FACET_RANGE + ".end";
   /**
-   * Number indicating the interval of sub-ranges for a numerical
-   * facet range.
-   * Can be overridden on a per field basis.
+   * Number indicating the interval of sub-ranges for a numerical facet range. Can be overridden on
+   * a per field basis.
    */
   public static final String FACET_RANGE_GAP = FACET_RANGE + ".gap";
   /**
-   * Boolean indicating how counts should be computed if the range
-   * between 'start' and 'end' is not evenly divisible by 'gap'.  If
-   * this value is true, then all counts of ranges involving the 'end'
-   * point will use the exact endpoint specified -- this includes the
-   * 'between' and 'after' counts as well as the last range computed
-   * using the 'gap'.  If the value is false, then 'gap' is used to
-   * compute the effective endpoint closest to the 'end' param which
-   * results in the range between 'start' and 'end' being evenly
-   * divisible by 'gap'.
-   * The default is false.
-   * Can be overridden on a per field basis.
+   * Boolean indicating how counts should be computed if the range between 'start' and 'end' is not
+   * evenly divisible by 'gap'. If this value is true, then all counts of ranges involving the 'end'
+   * point will use the exact endpoint specified -- this includes the 'between' and 'after' counts
+   * as well as the last range computed using the 'gap'. If the value is false, then 'gap' is used
+   * to compute the effective endpoint closest to the 'end' param which results in the range between
+   * 'start' and 'end' being evenly divisible by 'gap'. The default is false. Can be overridden on a
+   * per field basis.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java
##########
@@ -120,62 +125,64 @@ public String toString() {
     };
   }
 
-  /** A {@link Stream} view over {@link #iterator()} -- for convenience.  Treat it as read-only. */
+  /** A {@link Stream} view over {@link #iterator()} -- for convenience. Treat it as read-only. */
   public Stream<Map.Entry<String, String[]>> stream() {
     return StreamSupport.stream(spliterator(), false);
   }
-  // Do we add Map.forEach equivalent too?  But it eager-fetches the value, and Iterable<Map.Entry> allows the user
+  // Do we add Map.forEach equivalent too?  But it eager-fetches the value, and Iterable<Map.Entry>
+  // allows the user
   //  to only get the value when needed.

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/params/SpatialParams.java
##########
@@ -15,25 +15,16 @@
  * limitations under the License.
  */
 package org.apache.solr.common.params;
-/**
- *
- *
- **/
+/** */
 public interface SpatialParams {
   public static final String POINT = "pt";
   public static final String DISTANCE = "d";
-  public static final String FIELD = "sfield";  // the field that contains the points we are measuring from "pt"
-  /**
-   * km - kilometers
-   * mi - miles
-   */
+  public static final String FIELD =
+      "sfield"; // the field that contains the points we are measuring from "pt"
+  /** km - kilometers mi - miles */
   public static final String UNITS = "units";

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/params/SolrParams.java
##########
@@ -584,13 +569,17 @@ public String toQueryString() {
   }
 
   /**
-   * Generates a local-params string of the form <pre>{! name=value name2=value2}</pre>.
+   * Generates a local-params string of the form
+   *
+   * <pre>{! name=value name2=value2}</pre>
+   *
+   * .

Review comment:
       Fix this

##########
File path: solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
##########
@@ -211,14 +210,16 @@
 
   private Set<ClusterPropertiesListener> clusterPropertiesListeners = ConcurrentHashMap.newKeySet();
 
-  /**
-   * Used to submit notifications to Collection Properties watchers in order
-   **/
-  private final ExecutorService collectionPropsNotifications = ExecutorUtil.newMDCAwareSingleThreadExecutor(new SolrNamedThreadFactory("collectionPropsNotifications"));
+  /** Used to submit notifications to Collection Properties watchers in order */
+  private final ExecutorService collectionPropsNotifications =
+      ExecutorUtil.newMDCAwareSingleThreadExecutor(
+          new SolrNamedThreadFactory("collectionPropsNotifications"));
 
-  private static final long LAZY_CACHE_TIME = TimeUnit.NANOSECONDS.convert(STATE_UPDATE_DELAY, TimeUnit.MILLISECONDS);
+  private static final long LAZY_CACHE_TIME =
+      TimeUnit.NANOSECONDS.convert(STATE_UPDATE_DELAY, TimeUnit.MILLISECONDS);
 
-  private Future<?> collectionPropsCacheCleaner; // only kept to identify if the cleaner has already been started.
+  private Future<?>
+      collectionPropsCacheCleaner; // only kept to identify if the cleaner has already been started.

Review comment:
       Fix this




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on a change in pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #706:
URL: https://github.com/apache/solr/pull/706#discussion_r814804129



##########
File path: solr/solrj/src/java/org/apache/solr/common/util/Utils.java
##########
@@ -891,19 +918,20 @@ public static void reflectWrite(MapWriter.EntryWriter ew, Object o) throws IOExc
     for (FieldWriter fieldWriter : fieldWriters) {
       try {
         fieldWriter.write(ew, o);
-      } catch( Throwable e) {
+      } catch (Throwable e) {
         throw new RuntimeException(e);
-        //should not happen
+        // should not happen
       }
     }
   }
 
   private static List<FieldWriter> getReflectData(Class<?> c) throws IllegalAccessException {
     boolean sameClassLoader = c.getClassLoader() == Utils.class.getClassLoader();
-    //we should not cache the class references of objects loaded from packages because they will not get garbage collected
-    //TODO fix that later
-    List<FieldWriter> reflectData = sameClassLoader ? storedReflectData.get(c): null;
-    if(reflectData == null) {
+    // we should not cache the class references of objects loaded from packages because they will
+    // not get garbage collected
+    // TODO fix that later

Review comment:
       Fix this




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on a change in pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #706:
URL: https://github.com/apache/solr/pull/706#discussion_r815942841



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
##########
@@ -720,19 +749,21 @@ protected RouteException getRouteException(SolrException.ErrorCode serverError,
     NamedList<Object> cheader = new NamedList<>();
     cheader.add("status", status);
     cheader.add("QTime", timeMillis);
-    if (rf != null)
-      cheader.add(UpdateRequest.REPFACT, rf);
+    if (rf != null) cheader.add(UpdateRequest.REPFACT, rf);
     if (null != toleratedErrors) {
       cheader.add("maxErrors", ToleratedUpdateError.getUserFriendlyMaxErrors(maxToleratedErrors));
       cheader.add("errors", toleratedErrors);
       if (maxToleratedErrors < toleratedErrors.size()) {
         // cumulative errors are too high, we need to throw a client exception w/correct metadata
 
-        // NOTE: it shouldn't be possible for 1 == toleratedErrors.size(), because if that were the case
+        // NOTE: it shouldn't be possible for 1 == toleratedErrors.size(), because if that were the
+        // case

Review comment:
       Fixed in eec4ea82f595a2cf78b6380e9900677b34bcea19




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on a change in pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on a change in pull request #706:
URL: https://github.com/apache/solr/pull/706#discussion_r815942920



##########
File path: solr/solrj/src/java/org/apache/solr/client/solrj/response/AnalysisResponseBase.java
##########
@@ -122,15 +122,16 @@ protected TokenInfo buildTokenInfo(NamedList<?> tokenNL) {
     int end = (Integer) tokenNL.get("end");
     int position = (Integer) tokenNL.get("position");
     Boolean match = (Boolean) tokenNL.get("match");
-    return new TokenInfo(text, rawText, type, start, end, position, (match == null ? false : match));
+    return new TokenInfo(
+        text, rawText, type, start, end, position, (match == null ? false : match));
   }
 
-
-  //================================================= Inner Classes ==================================================
+  // ================================================= Inner Classes

Review comment:
       Fixed in eec4ea82f595a2cf78b6380e9900677b34bcea19




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] risdenk commented on pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
risdenk commented on pull request #706:
URL: https://github.com/apache/solr/pull/706#issuecomment-1054363888


   @ErickErickson merged changes from your PR #713 - includes your commit metadata so you will get credit when this merges :D


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] dsmiley commented on pull request #706: SOLR-14920: Spotless formatting for solrj

Posted by GitBox <gi...@apache.org>.
dsmiley commented on pull request #706:
URL: https://github.com/apache/solr/pull/706#issuecomment-1051065652


   +1 approved.  I didn't look at it but I approve based on the review and fixups you said you did yourself, and I've already provided input on a similar PR so you know what to look for.
   
   Thanks for doing this!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org