* @param execCommand a not-null <code>ExecCommand</code> instance.
* @return a {@link CommandLine} object.
*/
protected CommandLine toCommandLine(ExecCommand execCommand) {
notNull(execCommand, "execCommand");
CommandLine cl = new CommandLine(execCommand.getExecutable());
List<String> args = execCommand.getArgs();
for (String arg : args) {
// do not handle quoting here, it is already quoted
cl.addArgument(arg, false);
}
return cl;
}