File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/cli/bug Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,19 +34,14 @@ class BugCLI13Test {
3434 @ Test
3535 void testCLI13 () throws ParseException {
3636 final String debugOpt = "debug" ;
37- @ SuppressWarnings ("static-access" )
38- //@formatter:off
39- final Option debug = OptionBuilder
40- .withArgName (debugOpt )
41- .withDescription ("turn on debugging" )
42- .withLongOpt (debugOpt )
43- .hasArg ()
44- .create ('d' );
45- //@formatter:on
37+ OptionBuilder .withArgName (debugOpt );
38+ OptionBuilder .withDescription ("turn on debugging" );
39+ OptionBuilder .withLongOpt (debugOpt );
40+ OptionBuilder .hasArg ();
41+ final Option debug = OptionBuilder .create ('d' );
4642 final Options options = new Options ();
4743 options .addOption (debug );
48- final CommandLine commandLine = new PosixParser ().parse (options , new String [] {"-d" , "true" });
49-
44+ final CommandLine commandLine = new PosixParser ().parse (options , new String [] { "-d" , "true" });
5045 assertEquals ("true" , commandLine .getOptionValue (debugOpt ));
5146 assertEquals ("true" , commandLine .getOptionValue ('d' ));
5247 assertTrue (commandLine .hasOption ('d' ));
You can’t perform that action at this time.
0 commit comments