From ec248ffb74f1c038fdd6c7a77411f628ef51366f Mon Sep 17 00:00:00 2001 From: Krishnajinka Date: Fri, 6 Jul 2018 17:28:54 +0900 Subject: null ptr check rework based on review comments Issue-ID: APPC-1047 Change-Id: Ia87707535dc5825d18a6c35fdae416064dcb8c14 Signed-off-by: Krishnajinka --- .../onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'appc-config/appc-encryption-tool') diff --git a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java index f71bee1ec..86b0861cb 100644 --- a/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java +++ b/appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java @@ -105,10 +105,11 @@ public class WrapperEncryptionTool { log.debug("Caught Exception", e); log.info("Caught exception", e); log.info("APPC-MESSAGE:" + e.getMessage()); - dbResourceManager.cleanUp(); - } finally { - dbResourceManager.cleanUp(); + //When dbResourceManager is not created then no need to cleanup + if (dbResourceManager != null) { + dbResourceManager.cleanUp(); + } } } -- cgit 1.2.3-korg