This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new fede8a3c2ba SOLR-17954: Grammer tweak in error message (#3768)
fede8a3c2ba is described below
commit fede8a3c2bab21fe1f6d87a7aa0032b33923cc82
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.";
}
}