garydgregory commented on code in PR #217:
URL: https://github.com/apache/commons-cli/pull/217#discussion_r1452357445


##########
src/main/java/org/apache/commons/cli/OptionValidator.java:
##########
@@ -23,14 +23,35 @@ Licensed to the Apache Software Foundation (ASF) under one 
or more
  * @since 1.1
  */
 final class OptionValidator {
+    /* package private for testing access */
+    /** The array of additional characters allowed as the first character in 
the option but not in the rest of the option */
+    static final char[] ADDITIONAL_OPTION_CHARS = {'?', '@'};
+    /** The array of additional characters allowed in the rest of the option 
but not in the first position */
+    static final char[] ADDITIONAL_LONG_CHARS = {'-'};
+
+    /** 
+     * Checks the char array for a matching char.
+     * @param ary the array to search
+     * @param c the char to look for.
+     * @return {@code true} if {@code c} was in {@code ary}, {@code false} 
otherwise. 
+     */
+    private static boolean search(final char[] ary, final char c) {

Review Comment:
   'ary' is a poor parameter name here, almost any else else is better: 
'chars', 'array, 'buffer'...



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