@@ -83,8 +83,7 @@ public static final class Builder {
8383 * @throws IllegalArgumentException if there are any non valid Option characters in {@code opt}
8484 */
8585 private Builder (final String option ) throws IllegalArgumentException {
86- OptionValidator .validateOption (option );
87- this .option = option ;
86+ this .option = OptionValidator .validate (option );
8887 }
8988
9089 /**
@@ -332,44 +331,42 @@ private Option(final Builder builder) {
332331 /**
333332 * Creates an Option using the specified parameters.
334333 *
335- * @param opt short representation of the option
334+ * @param option short representation of the option
336335 * @param hasArg specifies whether the Option takes an argument or not
337336 * @param description describes the function of the option
338337 *
339338 * @throws IllegalArgumentException if there are any non valid Option characters in {@code opt}.
340339 */
341- public Option (final String opt , final boolean hasArg , final String description ) throws IllegalArgumentException {
342- this (opt , null , hasArg , description );
340+ public Option (final String option , final boolean hasArg , final String description ) throws IllegalArgumentException {
341+ this (option , null , hasArg , description );
343342 }
344343
345344 /**
346345 * Creates an Option using the specified parameters. The option does not take an argument.
347346 *
348- * @param opt short representation of the option
347+ * @param option short representation of the option
349348 * @param description describes the function of the option
350349 *
351350 * @throws IllegalArgumentException if there are any non valid Option characters in {@code opt}.
352351 */
353- public Option (final String opt , final String description ) throws IllegalArgumentException {
354- this (opt , null , false , description );
352+ public Option (final String option , final String description ) throws IllegalArgumentException {
353+ this (option , null , false , description );
355354 }
356355
357356 /**
358357 * Creates an Option using the specified parameters.
359358 *
360- * @param opt short representation of the option
361- * @param longOpt the long representation of the option
359+ * @param option short representation of the option
360+ * @param longOption the long representation of the option
362361 * @param hasArg specifies whether the Option takes an argument or not
363362 * @param description describes the function of the option
364363 *
365364 * @throws IllegalArgumentException if there are any non valid Option characters in {@code opt}.
366365 */
367- public Option (final String opt , final String longOpt , final boolean hasArg , final String description ) throws IllegalArgumentException {
366+ public Option (final String option , final String longOption , final boolean hasArg , final String description ) throws IllegalArgumentException {
368367 // ensure that the option is valid
369- OptionValidator .validateOption (opt );
370-
371- this .opt = opt ;
372- this .longOpt = longOpt ;
368+ this .opt = OptionValidator .validate (option );
369+ this .longOpt = longOption ;
373370
374371 // if hasArg is set then the number of arguments is 1
375372 if (hasArg ) {
0 commit comments