diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java index c0c7a93601b..64e34f4ec96 100644 --- a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java +++ b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java @@ -1309,7 +1309,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread { private void addPropertyParams(ZkNodeProps message, ModifiableSolrParams params) { // Now add the property.key=value pairs for (String key : message.keySet()) { - if (key.indexOf(COLL_PROP_PREFIX) != -1) { + if (key.startsWith(COLL_PROP_PREFIX)) { params.set(key, message.getStr(key)); } } 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 5d539c0ad65..83b773424b2 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 @@ -379,7 +379,7 @@ public class CollectionsHandler extends RequestHandlerBase { Iterator iter = params.getParameterNamesIterator(); while (iter.hasNext()) { String param = iter.next(); - if (param.indexOf(OverseerCollectionProcessor.COLL_PROP_PREFIX) != -1) { + if (param.startsWith(OverseerCollectionProcessor.COLL_PROP_PREFIX)) { props.put(param, params.get(param)); } }