This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git
The following commit(s) were added to refs/heads/master by this push:
new c9ffd67e Reject an empty option name in getMatchingOptions (#434).
c9ffd67e is described below
commit c9ffd67e1d6185fdfb833a6b08b265235cef6817
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Aug 1 14:11:57 2026 -0400
Reject an empty option name in getMatchingOptions (#434).
Javadoc
---
src/changes/changes.xml | 1 +
src/main/java/org/apache/commons/cli/Options.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 3353229f..dbccb62e 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,7 @@
<action type="fix" dev="ggregory" due-to="Dexter.k, Gary Gregory">Use
Locale.ENGLISH when parsing dates in Converter.DATE (#426).</action>
<action type="fix" dev="ggregory" due-to="Digiscrypt Technologies, Gary
Gregory">Reject non-BMP code points in the Character type converter
(#425).</action>
<action type="fix" dev="ggregory" due-to="Digiscrypt Technologies, Gary
Gregory">Reject invalid dates in Converter.DATE (#430).</action>
+ <action type="fix" dev="ggregory" due-to="farkhalit rida, Gary
Gregory">Reject an empty option name in getMatchingOptions (#434).</action>
<!-- ADD -->
<!-- UPDATE -->
<action type="update" dev="ggregory" due-to="Gary Gregory,
Dependabot">Bump org.apache.commons:commons-parent from 91 to 103 #414,
#416.</action>
diff --git a/src/main/java/org/apache/commons/cli/Options.java
b/src/main/java/org/apache/commons/cli/Options.java
index dcb6b52b..9d76967a 100644
--- a/src/main/java/org/apache/commons/cli/Options.java
+++ b/src/main/java/org/apache/commons/cli/Options.java
@@ -213,7 +213,7 @@ public class Options implements Serializable {
* Gets the options with a long name starting with the name specified.
*
* @param opt The partial name of the option, may be {@code null}.
- * @return The options matching the partial name specified, or an empty
list if none matches or the name is null or empty.
+ * @return A list of matching long option names, or an empty list if no
matches were found.
* @since 1.3
*/
public List<String> getMatchingOptions(final String opt) {