SOLR-6801 version can be string or number

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1652444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2015-01-16 16:00:50 +00:00
parent 255961719f
commit 8ee7579302
3 changed files with 6 additions and 5 deletions

View File

@ -433,14 +433,14 @@ public final class RequestHandlers {
return;
}
version = _pluginInfo.attributes.get("version");
if (version == null) {
if (_pluginInfo.attributes.get("version") == null ){
errMsg = "ERROR 'lib' attribute must be accompanied with version also";
unrecoverable = true;
_handler = this;
log.error(errMsg);
return;
}
version = String.valueOf(_pluginInfo.attributes.get("version"));
classLoader = new MemClassLoader(this);
}

View File

@ -30,6 +30,7 @@ import org.junit.After;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
@ -132,7 +133,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
payload = "{\n" +
"'update-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandlerV2' , 'lib':'test','version':'2'}\n" +
"'update-requesthandler' : { 'name' : '/test1', 'class': 'org.apache.solr.core.BlobStoreTestRequestHandlerV2' , 'lib':'test','version':2}\n" +
"}";
client = restTestHarnesses.get(random().nextInt(restTestHarnesses.size()));
@ -142,7 +143,7 @@ public class TestDynamicLoading extends AbstractFullDistribZkTestBase {
"/config/overlay?wt=json",
null,
Arrays.asList("overlay", "requestHandler", "/test1", "version"),
"2",10);
2l,10);
success= false;
for(int i=0;i<100;i++) {

View File

@ -233,7 +233,7 @@ public class TestSolrConfigHandler extends RestTestBase {
String testServerBaseUrl,
String uri,
CloudSolrClient cloudSolrServer,List<String> jsonPath,
String expected,
Object expected,
long maxTimeoutSeconds ) throws Exception {
boolean success = false;