check the plugin params null

This commit is contained in:
fanfuxiaoran 2014-06-06 17:49:28 +08:00
parent 56c316203a
commit a0e32473fa
2 changed files with 11 additions and 9 deletions

View File

@ -97,7 +97,7 @@ public class TestController {
return null; return null;
} }
} }
private RunScenarioResultModel buildWith(UUID runId) { private RunScenarioResultModel buildWith(UUID runId) {
RunScenarioResultModel result = new RunScenarioResultModel(); RunScenarioResultModel result = new RunScenarioResultModel();
result.setRunId(runId); result.setRunId(runId);

View File

@ -143,14 +143,16 @@ public class Scenario {
UsePlugin usePlugin = new UsePlugin(); UsePlugin usePlugin = new UsePlugin();
usePlugin.setId(usePluginModel.getId()); usePlugin.setId(usePluginModel.getId());
usePlugin.setName(usePluginModel.getName()); usePlugin.setName(usePluginModel.getName());
usePlugin.setParameters(new Parameter[usePluginModel.getParameters() if (usePluginModel.getParameters() != null) {
.size()]); usePlugin.setParameters(new Parameter[usePluginModel
int k = 0; .getParameters().size()]);
for (k = 0; k < usePluginModel.getParameters().size(); k++) { int k = 0;
ParameterModel parameterModel = usePluginModel.getParameters().get( for (k = 0; k < usePluginModel.getParameters().size(); k++) {
k); ParameterModel parameterModel = usePluginModel.getParameters()
Parameter parameter = extractParameter(parameterModel); .get(k);
usePlugin.getParameters()[k] = parameter; Parameter parameter = extractParameter(parameterModel);
usePlugin.getParameters()[k] = parameter;
}
} }
return usePlugin; return usePlugin;
} }