Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
1.10.0
-
None
Description
Currently, CommandLineParser will stop parsing silently if it meets an unrecognized option, leaving the remaining tokens to "args" rather than "options".
This sometimes lead to problems due to absence of subsequence options, and the error messages do not point to the true root cause. Example reported in the user ML.
I've checked and it seems that the "args" generated by CommandLineParser is not really used anywhere. Therefore, I propose to make the parser fail fast with explicit error message at unrecognized tokens.
The proposed changes are basically as follows:
- In CommandLineParser#parse, call DefaultParser#parse with the argument stopAtNonOption set to false.
- Remove args from ClusterConfiguration and its sub-classes.