Code block added to avoid Null pointer Exception 90/78390/4
authorJegadeesh Babu <jegabab1@in.ibm.com>
Wed, 13 Feb 2019 13:53:19 +0000 (19:23 +0530)
committerTakamune Cho <takamune.cho@att.com>
Thu, 14 Feb 2019 14:20:42 +0000 (14:20 +0000)
Added condition to avoid NullPointer Exception

Issue-ID: APPC-1425
Change-Id: I166633ccfcf51a8fcc8d4082aa8d2afa4b299398
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
appc-config/appc-encryption-tool/provider/src/main/java/org/onap/appc/encryptiontool/wrapper/WrapperEncryptionTool.java

index 1be6967..2870817 100644 (file)
@@ -7,6 +7,7 @@
  * Copyright (C) 2017 Amdocs
  * ================================================================================
  * Modifications Copyright (C) 2019 Ericsson
+ * Modifications Copyright (C) 2019 IBM
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -121,6 +122,7 @@ public class WrapperEncryptionTool {
             log.info("APPC-MESSAGE:" + e.getMessage());
 
         } finally {
+          if(dbResourceManager!=null)
             dbResourceManager.cleanUp();
         }
     }
@@ -166,6 +168,7 @@ public class WrapperEncryptionTool {
             log.info("APPC-MESSAGE:" + e.getMessage());
 
         } finally {
+          if(dbResourceManager!=null)
             dbResourceManager.cleanUp();
         }
     }