Skip to content

Apache Lucene open-source search software

remove useless pull of the first Commit

Mark Robert Miller99e6ece750b7
diff --git a/src/java/org/apache/solr/core/SolrDeletionPolicy.java b/src/java/org/apache/solr/core/SolrDeletionPolicy.java
index ac2ea1a446f..45086800ab3 100644
--- a/src/java/org/apache/solr/core/SolrDeletionPolicy.java
+++ b/src/java/org/apache/solr/core/SolrDeletionPolicy.java
@@ -87,7 +87,7 @@ public class SolrDeletionPolicy implements IndexDeletionPolicy, NamedListInitial
static String str(List commits) {
StringBuilder sb = new StringBuilder();
sb.append("num=").append(commits.size());
- IndexCommit comm = (IndexCommit) commits.get(0);
+
for (IndexCommit commit : (List<IndexCommit>) commits) {
sb.append("\n\t");
sb.append(str(commit));