Added fix for potential nullpointerexception 66/75866/1
authorChandan Ghosh <cghosh12@in.ibm.com>
Wed, 16 Jan 2019 10:54:52 +0000 (16:24 +0530)
committerChandan Ghosh <cghosh12@in.ibm.com>
Wed, 16 Jan 2019 10:58:45 +0000 (16:28 +0530)
Added fix for porential nullpointerexception

Issue-ID: HOLMES-189
Change-Id: Ibfb9868e35e358f1eca661871929f8333d402e39
Signed-off-by: Chandan Ghosh <cghosh12@in.ibm.com>
engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java

index 7472457..b474e69 100644 (file)
@@ -99,7 +99,9 @@ public class DroolsEngine {
         } catch (Exception e) {
             log.error("Failed to initialize the engine service module.", e);
         }
-        container = ks.newKieContainer(km.getReleaseId());
+        if(null!=km) {
+               container = ks.newKieContainer(km.getReleaseId());
+        }
         session = container.newKieSession();
         deployed.clear();
     }