SOLR-8677: Fix broken build

This commit is contained in:
anshum 2016-02-18 16:03:58 -08:00
parent d01230d639
commit a54e819a62
2 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse> {
@Override
public void setCoreName(String coreName) {
if (!SolrIdentifierValidator.validateCoreName(coreName)) {
throw new IllegalArgumentException("Invalid collection: " + coreName
throw new IllegalArgumentException("Invalid core: " + coreName
+ ". Core names must consist entirely of periods, underscores, and alphanumerics");
}
this.core = coreName;
@ -560,7 +560,7 @@ public class CoreAdminRequest extends SolrRequest<CoreAdminResponse> {
public static CoreAdminResponse renameCore(String coreName, String newName, SolrClient client )
throws SolrServerException, IOException {
if (!SolrIdentifierValidator.validateCoreName(newName)) {
throw new IllegalArgumentException("Invalid collection: " + newName
throw new IllegalArgumentException("Invalid core: " + newName
+ ". Core names must consist entirely of periods, underscores, and alphanumerics");
}

View File

@ -171,7 +171,7 @@ public class TestCoreAdmin extends AbstractEmbeddedSolrServerTestCase {
final String exceptionMessage = e.getMessage();
assertTrue(exceptionMessage.contains("Invalid core"));
assertTrue(exceptionMessage.contains("invalid$core@name"));
assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores and alphanumerics"));
assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, and alphanumerics"));
}
}
@ -182,9 +182,9 @@ public class TestCoreAdmin extends AbstractEmbeddedSolrServerTestCase {
fail();
} catch (IllegalArgumentException e) {
final String exceptionMessage = e.getMessage();
assertTrue(exceptionMessage.contains("Invalid core"));
assertTrue(e.getMessage(), exceptionMessage.contains("Invalid core"));
assertTrue(exceptionMessage.contains("invalid$core@name"));
assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores and alphanumerics"));
assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, and alphanumerics"));
}
}