mirror of https://github.com/apache/lucene.git
SOLR-5491: Testing for extra properties should use startsWith rather than indexOf
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1544518 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
95b973d613
commit
482de5a9f0
|
@ -1309,7 +1309,7 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
|
||||||
private void addPropertyParams(ZkNodeProps message, ModifiableSolrParams params) {
|
private void addPropertyParams(ZkNodeProps message, ModifiableSolrParams params) {
|
||||||
// Now add the property.key=value pairs
|
// Now add the property.key=value pairs
|
||||||
for (String key : message.keySet()) {
|
for (String key : message.keySet()) {
|
||||||
if (key.indexOf(COLL_PROP_PREFIX) != -1) {
|
if (key.startsWith(COLL_PROP_PREFIX)) {
|
||||||
params.set(key, message.getStr(key));
|
params.set(key, message.getStr(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,7 +379,7 @@ public class CollectionsHandler extends RequestHandlerBase {
|
||||||
Iterator<String> iter = params.getParameterNamesIterator();
|
Iterator<String> iter = params.getParameterNamesIterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
String param = iter.next();
|
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));
|
props.put(param, params.get(param));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue