commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Egge (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CLI-131) Options class returns options in random order
Date Tue, 05 Jun 2007 07:20:25 GMT

     [ https://issues.apache.org/jira/browse/CLI-131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Brian Egge updated CLI-131:
---------------------------

    Attachment: bug131.patch

Fix the issue by sorting the options inside the HelpFormatter class.  This fix would be the
least likely to cause problems with existing usage.

Another option would be to have the Options class use TreeMaps instead of HashMaps.  

> Options class returns options in random order
> ---------------------------------------------
>
>                 Key: CLI-131
>                 URL: https://issues.apache.org/jira/browse/CLI-131
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: CLI-1.x
>    Affects Versions: 1.0, 1.1
>            Reporter: Brian Egge
>            Priority: Minor
>             Fix For: 1.1
>
>         Attachments: bug131.patch
>
>
> The help formatter auto usage returns the options in a somewhat random order.  This is
because the options are inserted in a HashMap, and then a copy of the collection is returned
with the getOptions() method.
> The getOptions method should return the options in the order they were added, or in a
sorted order.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message