Skip to content

Commit c9ffd67

Browse files
committed
Reject an empty option name in getMatchingOptions (#434).
Javadoc
1 parent db57942 commit c9ffd67

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<action type="fix" dev="ggregory" due-to="Dexter.k, Gary Gregory">Use Locale.ENGLISH when parsing dates in Converter.DATE (#426).</action>
3232
<action type="fix" dev="ggregory" due-to="Digiscrypt Technologies, Gary Gregory">Reject non-BMP code points in the Character type converter (#425).</action>
3333
<action type="fix" dev="ggregory" due-to="Digiscrypt Technologies, Gary Gregory">Reject invalid dates in Converter.DATE (#430).</action>
34+
<action type="fix" dev="ggregory" due-to="farkhalit rida, Gary Gregory">Reject an empty option name in getMatchingOptions (#434).</action>
3435
<!-- ADD -->
3536
<!-- UPDATE -->
3637
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 91 to 103 #414, #416.</action>

src/main/java/org/apache/commons/cli/Options.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public Options addRequiredOption(final String opt, final String longOpt, final b
213213
* Gets the options with a long name starting with the name specified.
214214
*
215215
* @param opt The partial name of the option, may be {@code null}.
216-
* @return The options matching the partial name specified, or an empty list if none matches or the name is null or empty.
216+
* @return A list of matching long option names, or an empty list if no matches were found.
217217
* @since 1.3
218218
*/
219219
public List<String> getMatchingOptions(final String opt) {

0 commit comments

Comments
 (0)