milleruntime commented on a change in pull request #1971:
URL: https://github.com/apache/accumulo/pull/1971#discussion_r595205099
##########
File path:
core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
##########
@@ -96,6 +96,7 @@
private ClientInfo info;
private String instanceId;
private final ZooCache zooCache;
+ private static final String VALID_NAME_REGEX =
"^(\\w{1,1024}\\.)?(\\w{1,1024})$";
Review comment:
While I am not a big fan of regex (it can be very hard to
maintain/debug), I think it is OK to use here so we can have an easy constant
to check across the code. Speaking of, you only need one constant in a central
place to be reused across these classes. The best place I can think of is
[Constants.java](https://github.com/apache/accumulo/blob/09eef7b32da3d1c70709483c5c5a1645e3c64a44/core/src/main/java/org/apache/accumulo/core/Constants.java)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]