Issue Details (XML | Word | Printable)

Key: CLI-35
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Robert Fletcher
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons CLI

HelpFormatter doesn't sort options properly

Created: 29/Oct/03 01:12 AM   Updated: 15/Mar/07 04:49 PM
Return to search
Component/s: CLI-1.x
Affects Version/s: Nightly Builds
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File patch.txt 2003-10-29 01:14 AM Robert Fletcher 3 kB
Environment:
Operating System: All
Platform: All

Bugzilla Id: 24184


 Description  « Hide
HelpFormatter is using an inner class Comparator implementation to sort Option
objects, however it seems to be a bit confused about what types of object it is
sorting. The inner class is called StringBufferComparator, although it's
actually sorting Option objects. Further, it simply compares the object's
toString() values rather than using the getKey() method which would perform the
sort that the comments seem to indicate is desired. The sort that is actually
performed doesn't appear to modify the ordering of the list at all.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.