mirror of https://github.com/apache/lucene.git
SOLR-8677: Fix broken build
This commit is contained in:
parent
d01230d639
commit
a54e819a62
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue