Command cmd = cmdService.getCommand(commandID);
ArrayList<Parameterization> parameters = null;
Command cmd = cmdService.getCommand(commandID);
ArrayList<Parameterization> parameters = null;
+ ParameterizedCommand pc;
+
if (paramMap != null) {
// Set parameters of the command to launch :
parameters = new ArrayList<Parameterization>();
if (paramMap != null) {
// Set parameters of the command to launch :
parameters = new ArrayList<Parameterization>();
cmd.getParameter(id), paramMap.get(id));
parameters.add(parameterization);
}
cmd.getParameter(id), paramMap.get(id));
parameters.add(parameterization);
}
- }
- // build the parameterized command
- ParameterizedCommand pc = new ParameterizedCommand(cmd,
- parameters.toArray(new Parameterization[parameters.size()]));
+ pc = new ParameterizedCommand(cmd,
+ parameters.toArray(new Parameterization[parameters
+ .size()]));
+ } else
+ pc = new ParameterizedCommand(cmd, null);
+
// execute the command
handlerService.executeCommand(pc, null);
} catch (Exception e) {
// execute the command
handlerService.executeCommand(pc, null);
} catch (Exception e) {