File tree Expand file tree Collapse file tree
main/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 <body >
2424
2525 <release version =" 1.3" date =" in SVN" >
26+ <action type =" fix" dev =" tn" issue =" CLI-230" >
27+ Options.getRequiredOptions() now returns an unmodifiable list.
28+ </action >
2629 <action type =" add" dev =" tn" issue =" CLI-224" due-to =" Duncan Jones, Brian Blount" >
2730 Added new fluent API to create Option instances via builder class Option.Builder.
2831 This replaces the now deprecated OptionBuilder.
Original file line number Diff line number Diff line change 2727 * if any exists, a flag indicating if an argument is required for
2828 * this option, and a self-documenting description of the option.
2929 * <p>
30- * An Option is not created independently, but is create through
30+ * An Option is not created independently, but is created through
3131 * an instance of {@link Options}.
32+ * <p>
33+ * <b>Note:</b> once an {@link Option} has been added to an instance
34+ * of {@link Options}, it's required flag may not be changed anymore.
3235 *
3336 * @see org.apache.commons.cli.Options
3437 * @see org.apache.commons.cli.CommandLine
Original file line number Diff line number Diff line change @@ -197,11 +197,11 @@ List<Option> helpOptions()
197197 /**
198198 * Returns the required options.
199199 *
200- * @return List of required options
200+ * @return read-only List of required options
201201 */
202202 public List getRequiredOptions ()
203203 {
204- return requiredOpts ;
204+ return Collections . unmodifiableList ( requiredOpts ) ;
205205 }
206206
207207 /**
You can’t perform that action at this time.
0 commit comments