Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-8677: Fix broken build

anshumc7c5b8fe4984
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 68fac7d09cb..c9698ae2e7f 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
@@ -498,7 +498,7 @@ public class CollectionsHandler extends RequestHandlerBase {
final String newShardName = req.getParams().get(SHARD_ID_PROP);
if (!SolrIdentifierValidator.validateShardName(newShardName)) {
throw new SolrException(ErrorCode.BAD_REQUEST, "Invalid shard: " + newShardName
- + ". Shard names must consist entirely of periods, underscores and alphanumerics");
+ + ". Shard names must consist entirely of periods, underscores, and alphanumerics");
}
if (!ImplicitDocRouter.NAME.equals(((Map) clusterState.getCollection(req.getParams().get(COLLECTION_PROP)).get(DOC_ROUTER)).get(NAME)))
throw new SolrException(ErrorCode.BAD_REQUEST, "shards can be added only to 'implicit' collections");
@@ -985,7 +985,7 @@ public class CollectionsHandler extends RequestHandlerBase {
for (String shard : shardsParam.split(",")) {
if (!SolrIdentifierValidator.validateShardName(shard))
throw new SolrException(ErrorCode.BAD_REQUEST, "Invalid shard: " + shard
- + ". Shard names must consist entirely of periods, underscores and alphanumerics");;
+ + ". Shard names must consist entirely of periods, underscores, and alphanumerics");;
}
}
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
index 700954f33a6..441be5d47dc 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
@@ -300,7 +300,7 @@ public abstract class CollectionAdminRequest <Q extends CollectionAdminRequest<Q
/**
* Provide the name of the shards to be created, separated by commas
*
- * Shard names must consist entirely of periods, underscores and alphanumerics. Other characters are not allowed.
+ * Shard names must consist entirely of periods, underscores, and alphanumerics. Other characters are not allowed.
*
* @throws IllegalArgumentException if any of the shard names contain invalid characters.
*/
@@ -308,7 +308,7 @@ public abstract class CollectionAdminRequest <Q extends CollectionAdminRequest<Q
for (String shard : shards.split(",")) {
if (!SolrIdentifierValidator.validateShardName(shard)) {
throw new IllegalArgumentException("Invalid shard: " + shard
- + ". Shard names must consist entirely of periods, underscores and alphanumerics");
+ + ". Shard names must consist entirely of periods, underscores, and alphanumerics");
}
}
this.shards = shards;
@@ -448,7 +448,7 @@ public abstract class CollectionAdminRequest <Q extends CollectionAdminRequest<Q
/**
* Provide the name of the shard to be created.
*
- * Shard names must consist entirely of periods, underscores and alphanumerics. Other characters are not allowed.
+ * Shard names must consist entirely of periods, underscores, and alphanumerics. Other characters are not allowed.
*
* @throws IllegalArgumentException if the shard name contains invalid characters.
*/
@@ -456,7 +456,7 @@ public abstract class CollectionAdminRequest <Q extends CollectionAdminRequest<Q
public CreateShard setShardName(String shardName) {
if (!SolrIdentifierValidator.validateShardName(shardName)) {
throw new IllegalArgumentException("Invalid shard: " + shardName
- + ". Shard names must consist entirely of periods, underscores and alphanumerics");
+ + ". Shard names must consist entirely of periods, underscores, and alphanumerics");
}
this.shardName = shardName;
return this;