From 685ed1545ed28b777a3ba6e7d315b78f355154cb Mon Sep 17 00:00:00 2001 From: rb7147 Date: Fri, 9 Jun 2017 15:11:06 -0400 Subject: [Policy-20] getConfig & Policy resolved blockers Change-Id: If08e4c90d419e8d6e1426d817a12dde5b7cafba3 Signed-off-by: rb7147 --- .../controlloop/compiler/ControlLoopCompiler.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'ECOMP-ControlloopPolicy') diff --git a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java index 799371a2a..2f01307af 100644 --- a/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java +++ b/ECOMP-ControlloopPolicy/src/main/java/org/openecomp/policy/controlloop/compiler/ControlLoopCompiler.java @@ -78,14 +78,16 @@ public class ControlLoopCompiler { if (controlLoop == null && callback != null) { callback.onError("controlLoop cannot be null"); } - if ((controlLoop.getControlLoopName() == null || controlLoop.getControlLoopName().length() < 1) && callback != null) { - callback.onError("Missing controlLoopName"); - } - if ((!controlLoop.getVersion().contentEquals(ControlLoop.getVERSION())) && callback != null) { - callback.onError("Unsupported version for this compiler"); - } - if (controlLoop.getTrigger_policy() == null || controlLoop.getTrigger_policy().length() < 1) { - throw new CompilerException("trigger_policy is not valid"); + if (controlLoop!=null){ + if ((controlLoop.getControlLoopName() == null || controlLoop.getControlLoopName().length() < 1) && callback != null) { + callback.onError("Missing controlLoopName"); + } + if ((!controlLoop.getVersion().contentEquals(ControlLoop.getVERSION())) && callback != null) { + callback.onError("Unsupported version for this compiler"); + } + if (controlLoop.getTrigger_policy() == null || controlLoop.getTrigger_policy().length() < 1) { + throw new CompilerException("trigger_policy is not valid"); + } } } -- cgit 1.2.3-korg