diff --git a/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java b/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java index aa382821c10..c0b19f57f7a 100644 --- a/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java +++ b/solr/solrj/src/java/org/apache/solr/common/util/StrUtils.java @@ -42,7 +42,9 @@ public class StrUtils { public static List splitSmart(String s, char separator, boolean trimEmpty) { List l = splitSmart(s, separator); - if (l.size() > 0 && l.get(0).isEmpty()) l.remove(0); + if(trimEmpty){ + if (l.size() > 0 && l.get(0).isEmpty()) l.remove(0); + } return l; }