Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-17954: Grammer tweak in error message (#3768)

Eric Pugh498c2312969b
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.";
}
}