From 9756ef19995508350f700ab7064be2795e07b15a Mon Sep 17 00:00:00 2001 From: hmm Date: Thu, 4 Sep 2014 14:15:06 +0800 Subject: [PATCH] fix bug "scriptFilterOptionsModel may be null" --- .../org/bench4q/master/domain/factory/TestPlanFactory.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java index 1fb137f1..24a09125 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java @@ -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 filterPluginId = new ArrayList();