Skip to content

Commit e89475c

Browse files
committed
[CLI-218] Clarify javadoc of CommandLine.getOptionValue.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1444365 13f79535-47bb-0310-9956-ffa450edef68
1 parent 08a1eb7 commit e89475c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/changes/changes.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<body>
2424

2525
<release version="1.3" date="in SVN">
26+
<action type="fix" dev="tn" issue="CLI-218" due-to="Sven">
27+
Clarify javadoc for CommandLine.getOptionValue() that the first specified
28+
argument will be returned.
29+
</action>
2630
<action type="add" dev="tn" issue="CLI-214" due-to="Alexandru Mocanu">
2731
Added new method Options.addOption(String, String).
2832
</action>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public Object getOptionObject(char opt)
133133
}
134134

135135
/**
136-
* Retrieve the argument, if any, of this option.
136+
* Retrieve the first argument, if any, of this option.
137137
*
138138
* @param opt the name of the option
139139
* @return Value of the argument if option is set, and has an argument,
@@ -147,7 +147,7 @@ public String getOptionValue(String opt)
147147
}
148148

149149
/**
150-
* Retrieve the argument, if any, of this option.
150+
* Retrieve the first argument, if any, of this option.
151151
*
152152
* @param opt the character name of the option
153153
* @return Value of the argument if option is set, and has an argument,
@@ -218,7 +218,7 @@ public String[] getOptionValues(char opt)
218218
}
219219

220220
/**
221-
* Retrieve the argument, if any, of an option.
221+
* Retrieve the first argument, if any, of an option.
222222
*
223223
* @param opt name of the option
224224
* @param defaultValue is the default value to be returned if the option

0 commit comments

Comments
 (0)