@@ -358,7 +358,7 @@ public void testGetOptionValue(final String[] args, final Option opt, final Opti
358358 final String optValue , final boolean grpDep , final String grpValue , final Option grpOpt ) throws ParseException {
359359 final Options options = new Options ().addOptionGroup (optionGroup );
360360 final List <Option > handler = new ArrayList <>();
361- final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).build ().parse (options , args );
361+ final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).get ().parse (options , args );
362362 final Supplier <String > thinger = () -> "thing" ;
363363 final OptionGroup otherGroup = new OptionGroup ().addOption (Option .builder ("o" ).longOpt ("other" ).hasArg ().build ())
364364 .addOption (Option .builder ().option ("p" ).longOpt ("part" ).hasArg ().build ());
@@ -464,7 +464,7 @@ public void testGetOptionValues(final String[] args, final Option opt, final Opt
464464 final String [] optValue , final boolean grpDep , final String [] grpValue , final Option grpOpt ) throws ParseException {
465465 final Options options = new Options ().addOptionGroup (optionGroup );
466466 final List <Option > handler = new ArrayList <>();
467- final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).build ().parse (options , args );
467+ final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).get ().parse (options , args );
468468 final OptionGroup otherGroup = new OptionGroup ().addOption (Option .builder ("o" ).longOpt ("other" ).hasArg ().build ())
469469 .addOption (Option .builder ().option ("p" ).longOpt ("part" ).hasArg ().build ());
470470 final OptionGroup nullGroup = null ;
@@ -509,7 +509,7 @@ public void testGetParsedOptionValue(final String[] args, final Option opt, fina
509509 final Integer optValue , final boolean grpDep , final Integer grpValue , final Option grpOpt ) throws ParseException {
510510 final Options options = new Options ().addOptionGroup (optionGroup );
511511 final List <Option > handler = new ArrayList <>();
512- final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).build ().parse (options , args );
512+ final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).get ().parse (options , args );
513513 final Supplier <Integer > thinger = () -> 2 ;
514514 final OptionGroup otherGroup = new OptionGroup ().addOption (Option .builder ("o" ).longOpt ("other" ).hasArg ().build ())
515515 .addOption (Option .builder ().option ("p" ).longOpt ("part" ).hasArg ().build ());
@@ -617,7 +617,7 @@ public void testHasOption(final String[] args, final Option opt, final OptionGro
617617 final boolean has , final boolean grpDep , final boolean hasGrp , final Option grpOpt ) throws ParseException {
618618 final Options options = new Options ().addOptionGroup (optionGroup );
619619 final List <Option > handler = new ArrayList <>();
620- final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).build ().parse (options , args );
620+ final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (handler ::add ).get ().parse (options , args );
621621 final OptionGroup otherGroup = new OptionGroup ().addOption (Option .builder ("o" ).longOpt ("other" ).hasArg ().build ())
622622 .addOption (Option .builder ().option ("p" ).longOpt ("part" ).hasArg ().build ());
623623 final OptionGroup nullGroup = null ;
@@ -674,7 +674,7 @@ public void testHasOptionNoDeprecationHandler(final String[] args, final Option
674674 final boolean has , final boolean grpDep , final boolean hasGrp , final Option grpOpt ) throws ParseException {
675675 final Options options = new Options ().addOptionGroup (optionGroup );
676676 final ByteArrayOutputStream baos = new ByteArrayOutputStream ();
677- final CommandLine commandLine = DefaultParser .builder ().build ().parse (options , args );
677+ final CommandLine commandLine = DefaultParser .builder ().get ().parse (options , args );
678678 final PrintStream ps = System .out ;
679679 try {
680680 System .setOut (new PrintStream (baos ));
@@ -726,7 +726,7 @@ public void testHasOptionNullDeprecationHandler(final String[] args, final Optio
726726 final boolean has , final boolean grpDep , final boolean hasGrp , final Option grpOpt ) throws ParseException {
727727 final Options options = new Options ().addOptionGroup (optionGroup );
728728 final ByteArrayOutputStream baos = new ByteArrayOutputStream ();
729- final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (null ).build ().parse (options , args );
729+ final CommandLine commandLine = DefaultParser .builder ().setDeprecatedHandler (null ).get ().parse (options , args );
730730 final PrintStream ps = System .out ;
731731 try {
732732 System .setOut (new PrintStream (baos ));
@@ -765,7 +765,7 @@ public void testHasOptionNullDeprecationHandler(final String[] args, final Optio
765765 public void testNoDeprecationHandler (final String [] args , final Option opt , final OptionGroup optionGroup , final boolean optDep ,
766766 final String optValue , final boolean grpDep , final String grpValue , final Option grpOpt ) throws ParseException {
767767 final Options options = new Options ().addOptionGroup (optionGroup );
768- final CommandLine commandLine = DefaultParser .builder ().build ().parse (options , args );
768+ final CommandLine commandLine = DefaultParser .builder ().get ().parse (options , args );
769769 final Supplier <String > thinger = () -> "thing" ;
770770 final Supplier <String > nullSupplier = null ;
771771 final ByteArrayOutputStream baos = new ByteArrayOutputStream ();
0 commit comments