Details
-
Sub-task
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
In diskbalancer.command.Command#verifyCommandOptions. The following code does not do what it expected to do:
if (!validArgs.containsKey(opt.getArgName())) {
opt.getArgName() always returns "arg" instead of i.e., report or uri, which is the expected parameter to check.
It should use opt.getLongOpt() to get the option names. It can pass on the branch because opt.getArgName() always returns "arg", which is accidently in validArgs. However I don't think it is the intention for this function.
Additionally, in the following code
validArguments.append("Valid arguments are : %n");
This %n is not used.