unused imports
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
index 5056b44..b9c5439 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
@@ -19,7 +19,6 @@
 import java.io.IOException;
 import java.lang.invoke.MethodHandles;
 import java.net.URI;
-import java.nio.charset.StandardCharsets;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
index 7839532..18a6438 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
@@ -124,9 +124,11 @@
    * Used to create a new Collection State when only a replica is updated
    */
   public DocCollection copyWith( PerReplicaStates newPerReplicaStates) {
-    log.debug("collection :{} going to be updated :  per-replica state :{} -> {}",
-        name,
-        getChildNodesVersion(), newPerReplicaStates.cversion);
+    if (log.isDebugEnabled()) {
+      log.debug("collection :{} going to be updated :  per-replica state :{} -> {}",
+              name,
+              getChildNodesVersion(), newPerReplicaStates.cversion);
+    }
     if(getChildNodesVersion() == newPerReplicaStates.cversion) return this;
     Set<String> modifiedReplicas = PerReplicaStates.findModifiedReplicas(newPerReplicaStates, this.perReplicaStates);
     if(modifiedReplicas.isEmpty()) return this; //nothing is modified
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 9960e34..8a0bb23 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -23,13 +23,11 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.EnumSet;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.Objects;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
@@ -1633,7 +1631,9 @@
     PerReplicaStates current = c.getPerReplicaStates();
     PerReplicaStates newPrs = PerReplicaStates.fetch(c.getZNode(), zkClient, current);
     if (newPrs != current) {
-      log.debug("just-in-time update for a fresh per-replica-state {}", c.getName());
+      if(log.isDebugEnabled()) {
+        log.debug("update for a fresh per-replica-state {}", c.getName());
+      }
       DocCollection modifiedColl = c.copyWith(newPrs);
       updateWatchedCollection(c.getName(), modifiedColl);
       return modifiedColl;