X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ECOMP-ControlloopPolicy%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fcontrolloop%2Fcompiler%2FControlLoopCompiler.java;h=2f01307afb4528ce466c9224a5d58117745e8b31;hb=685ed1545ed28b777a3ba6e7d315b78f355154cb;hp=799371a2a5dc1cf501f95565f0628f9c624361a2;hpb=fc5c07705edc4dcb7083b39116a43844bb6a1490;p=policy%2Fengine.git 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"); + } } }