Skip to content

Commit 8f77d1d

Browse files
committed
OptionGroup.getOptions() already returns a Collection<Option> so there's no need to involve type cast
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1095599 13f79535-47bb-0310-9956-ffa450edef68
1 parent a955324 commit 8f77d1d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class Options implements Serializable
6969
*/
7070
public Options addOptionGroup(OptionGroup group)
7171
{
72-
Iterator options = group.getOptions().iterator();
72+
Iterator<Option> options = group.getOptions().iterator();
7373

7474
if (group.isRequired())
7575
{
@@ -78,7 +78,7 @@ public Options addOptionGroup(OptionGroup group)
7878

7979
while (options.hasNext())
8080
{
81-
Option option = (Option) options.next();
81+
Option option = options.next();
8282

8383
// an Option cannot be required if it is in an
8484
// OptionGroup, either the group is required or

0 commit comments

Comments
 (0)