This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 498c2312969 SOLR-17954: Grammer tweak in error message (#3768)
498c2312969 is described below
commit 498c2312969ba98a15f30cba004ff942198ef1e7
Author: Eric Pugh <[email protected]>
AuthorDate: Fri Oct 24 10:47:04 2025 -0400
SOLR-17954: Grammer tweak in error message (#3768)
---
.../apache/solr/client/solrj/util/SolrIdentifierValidator.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java
b/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java
index b8476ace462..c66b560304b 100644
---
a/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java
+++
b/solr/solrj/src/java/org/apache/solr/client/solrj/util/SolrIdentifierValidator.java
@@ -60,10 +60,10 @@ public class SolrIdentifierValidator {
}
private static boolean validateIdentifier(String identifier) {
- if (identifier == null ||
!identifierPattern.matcher(identifier).matches()) {
- return false;
+ if (identifier != null && identifierPattern.matcher(identifier).matches())
{
+ return true;
}
- return true;
+ return false;
}
public static String getIdentifierMessage(IdentifierType identifierType,
String name) {
@@ -75,6 +75,6 @@ public class SolrIdentifierValidator {
+ "]. "
+ typeStr
+ " names must consist entirely of periods, "
- + "underscores, hyphens, and alphanumerics as well not start with a
hyphen";
+ + "underscores, hyphens, and alphanumerics as well as not start with a
hyphen.";
}
}