DomGarguilo commented on code in PR #5893:
URL: https://github.com/apache/accumulo/pull/5893#discussion_r2364004008


##########
core/src/main/java/org/apache/accumulo/core/data/ResourceGroupId.java:
##########
@@ -43,16 +43,23 @@ public class ResourceGroupId extends 
AbstractId<ResourceGroupId> {
 
   private ResourceGroupId(String canonical) {
     super(canonical);
-    if (!GROUP_NAME_PATTERN.matcher(canonical).matches()) {
-      throw new IllegalArgumentException(
-          "Group name: " + canonical + " contains invalid characters");
+    validateGroupName(canonical);
+  }
+
+  /**
+   * @throws IllegalArgumentException if the group name is invalid
+   */
+  public static void validateGroupName(String groupName) {
+    if (!GROUP_NAME_PATTERN.matcher(groupName).matches()) {
+      throw new IllegalArgumentException("Group name '" + groupName
+          + "' is invalid. Valid names must match the pattern: " + 
GROUP_NAME_PATTERN.pattern());

Review Comment:
   fixed in 581fec7



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to