summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src/main
diff options
context:
space:
mode:
authorSunder Tattavarada <statta@research.att.com>2018-02-08 17:28:25 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-08 17:28:25 +0000
commit08f55be6a0a9708ceeb176d5e1a0a56f885fad59 (patch)
tree687bdf12ef0f46b58d292706b3cb4505c415f49b /ecomp-portal-BE-common/src/main
parent8bcc6f6d7a6b24f9358f897d5aad18f618fa0b95 (diff)
parented404fea2eae15505b42a15e35f762be3dfc74d9 (diff)
Merge "check if localsession object null before closing"
Diffstat (limited to 'ecomp-portal-BE-common/src/main')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
index 3535f753..c65b4af9 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/service/UserRolesCommonServiceImpl.java
@@ -371,7 +371,9 @@ public class UserRolesCommonServiceImpl {
throw new Exception(e.getMessage());
}
} finally {
- localSession.close();
+ if (localSession != null) {
+ localSession.close();
+ }
if (!result && !"DELETE".equals(reqType)) {
throw new Exception(
"Exception occurred in syncUserRoles while closing database session for app: '" + appId + "'.");