keith-turner commented on code in PR #5262:
URL: https://github.com/apache/accumulo/pull/5262#discussion_r1928991608


##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/FateLock.java:
##########
@@ -78,11 +78,11 @@ public static class FateLockNode implements 
Comparable<FateLockNode> {
     public final long sequence;
     public final String lockData;
 
-    private FateLockNode(String nodeName) {
+    FateLockNode(String nodeName) {
       int len = nodeName.length();
       Preconditions.checkArgument(nodeName.startsWith(PREFIX) && 
nodeName.charAt(len - 11) == '#',
           "Illegal node name %s", nodeName);

Review Comment:
   It depends on the number of digits in the negative number.  If its a 10 
digit negative number then `%010d` will produce a 11 char string.  If its 9 
digits or less then `%010d` will produce a 10 char string including the 
negative.  For the 9 digit or less case the `#` check will not catch negative, 
but the later `Long.parseUnsignedLong` call will catch it.



-- 
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