Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: correction: Usage Scenario shows getOptionValue() a method of options, not cmd

...

No Format
                                .create( "

find" );

The section titled "Retrieving the argument value" shows an example of accessing the getOptionValue() method of Options. This is actually a method of CommandLine.

// get c option valueBR
String countryCode =options.getOptionValue("c"); // (Wrong if options is an instance of Options)

This should instead be:

// get c option valueBR
String countryCode =cmd.getOptionValue("c"); // (Here cmd is an instance of CommandLine)