[
https://issues.apache.org/jira/browse/HADOOP-7180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daryn Sharp updated HADOOP-7180:
--------------------------------
Attachment: HADOOP-7180-2.patch
Converted to junit 4, added what I think are the missing javadocs(?), added
min/max & expected args to parameter exceptions.
I omitted the suggested change to add an index to the list version of parse.
The index is present on the old method to skip over ARGV[0] (the command).
With the forthcoming changes, the command will be consumed from the list before
calling the list-based parse. If it was added, then the sublist/erase would
still be required since the list is expected to be destructively modified. If
you feel strongly about the index, please let me know.
> Improve CommandFormat
> ---------------------
>
> Key: HADOOP-7180
> URL: https://issues.apache.org/jira/browse/HADOOP-7180
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs
> Reporter: Daryn Sharp
> Assignee: Daryn Sharp
> Fix For: 0.23.0
>
> Attachments: HADOOP-7180-2.patch, HADOOP-7180.patch
>
>
> CommandFormat currently takes an array and offset for parsing and returns a
> list of arguments. It'd be much more convenient to have it process a list
> too. It would also be nice to differentiate between too few and too many
> args instead of the generic "Illegal number of arguments". Finally,
> CommandFormat is completely devoid of tests.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira