From 55151b1589968635ecb55e70f39b9b5fbb468eb6 Mon Sep 17 00:00:00 2001 From: Chandan Ghosh Date: Wed, 16 Jan 2019 16:24:52 +0530 Subject: Added fix for potential nullpointerexception Added fix for porential nullpointerexception Issue-ID: HOLMES-189 Change-Id: Ibfb9868e35e358f1eca661871929f8333d402e39 Signed-off-by: Chandan Ghosh --- .../src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engine-d/src/main/java/org') diff --git a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java index 7472457..b474e69 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java @@ -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(); } -- cgit 1.2.3-korg