X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcomponents%2FPolicyDBDao.java;h=cf183114cee65b5d8b5c8c1fc4277fb38d9b34d9;hb=428150834ee60899b9a8da019bae3c8bf009adf1;hp=7591781ffb57afe8ee1a05953bb488e9be54e563;hpb=775f45908025e46a40c9c147fca2066af5c8c5b8;p=policy%2Fengine.git 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; }