fix bug "scriptFilterOptionsModel may be null"

This commit is contained in:
hmm 2014-09-04 14:15:06 +08:00
parent ed6f913e7a
commit 9756ef1999
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@ import org.bench4q.share.models.master.RunningScriptModel;
import org.bench4q.share.models.master.TestPlanModel;
import org.bench4q.share.models.master.statistics.ScriptResultModel;
import org.bench4q.share.models.monitor.MonitorMain;
import org.python.antlr.PythonParser.return_stmt_return;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@ -167,6 +168,9 @@ public class TestPlanFactory {
private String createAScriptWithFilter(
ScriptFilterOptionsModel scriptFilterOptionsModel, String scriptContent) {
if(scriptFilterOptionsModel == null){
return scriptContent;
}
RunScenarioModel runScenarioModel = (RunScenarioModel) MarshalHelper
.tryUnmarshal(RunScenarioModel.class, scriptContent);
List<String> filterPluginId = new ArrayList<String>();