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


##########
core/src/main/java/org/apache/accumulo/core/iteratorsImpl/IteratorProperty.java:
##########
@@ -144,15 +144,22 @@ public static IteratorProperty parse(String property, 
String value) {
     check(iterPropParts.length == 4 || iterPropParts.length == 6, property, 
value);
     IteratorUtil.IteratorScope scope = 
IteratorUtil.IteratorScope.valueOf(iterPropParts[2]);
     String iterName = iterPropParts[3];
+    check(!iterName.isEmpty(), property, value);
 
     if (iterPropParts.length == 4) {
-      String[] valTokens = value.split(",");
+      String[] valTokens = value.split(",", -1);

Review Comment:
   Yea it just helps so we can distinguish between a failure on a missing class 
name vs a missing comma.
   
   Also unrelated, in d7eb5d4 I refactored the check() method to use 
`Preconditions` internally which reads better and is more concise. I took a 
look at the original PR to see if there was a reason this wasn't done there but 
didn't find any.



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