From 428150834ee60899b9a8da019bae3c8bf009adf1 Mon Sep 17 00:00:00 2001 From: rb7147 Date: Mon, 4 Dec 2017 16:45:55 -0500 Subject: Upgraded the latest ONAP SDK Upgraded latest ONAP SDK Code. Change-Id: I669d6cfcefe068b1e4c078889d7d6c77ce788e2e Issue-ID: POLICY-432 Signed-off-by: rb7147 --- .../org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ONAP-PAP-REST/src/main') diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java index 7591781ff..cf183114c 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java @@ -1219,13 +1219,12 @@ public class PolicyDBDao { groupQuery.setParameter("groupId", group.getId()); groupQuery.setParameter("deleted", false); List groupQueryList = groupQuery.getResultList(); - if(groupQueryList!=null){ + if(groupQueryList!=null && !groupQueryList.isEmpty()){ GroupEntity dbgroup = (GroupEntity)groupQueryList.get(0); updatedGroup = synchronizeGroupPoliciesInFileSystem(group, dbgroup); + logger.info("Group was updated during file system audit: " + updatedGroup.toString()); } - } catch (PAPException e) { - logger.error(e); - } catch (PolicyDBException e) { + } catch (PAPException | PolicyDBException e) { logger.error(e); } catch (Exception e) { logger.error(e); @@ -1236,7 +1235,6 @@ public class PolicyDBDao { em.getTransaction().commit(); em.close(); - logger.info("Group was updated during file system audit: " + updatedGroup.toString()); return updatedGroup; } -- cgit 1.2.3-korg