X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ECOMP-XACML%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fxacml%2Fstd%2Fpap%2FStdEngine.java;h=83ff56ebfdab33015419ff43998599ce73e48b83;hb=refs%2Fchanges%2F45%2F4445%2F4;hp=951f89110e6329ee0f94390dbcbb897351b0ae2f;hpb=7e547eaa55920dfbc9691eab33bb728395b50cf2;p=policy%2Fengine.git diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java index 951f89110..83ff56ebf 100644 --- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java +++ b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/std/pap/StdEngine.java @@ -155,7 +155,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE this.groups = this.readProperties(this.repository, properties); } catch (IOException e) { PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE, e, "StdEngine", "Failed to load properties file"); - this.groups = new HashSet(); + this.groups = new HashSet<>(); } // // Initialize the default group @@ -377,7 +377,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE // Add the default PIP configuration. String list = props.getProperty(XACMLProperties.PROP_PIP_ENGINES); if (list != null && list.length() > 0) { - Set pipConfigs = new HashSet(); + Set pipConfigs = new HashSet<>(); for (String pipID : list.split("[,]")) { StdPDPPIPConfig config = new StdPDPPIPConfig(pipID, props); if (config.isConfigured()) { @@ -561,7 +561,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE // private Set readProperties(Path repository, Properties properties) throws PAPException { - Set groups = new HashSet(); + Set groups = new HashSet<>(); // // See if there is a groups property // @@ -616,7 +616,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE // // Iterate our groups // - List ids = new ArrayList(); + List ids = new ArrayList<>(); for (PDPGroup group : this.groups) { ids.add(group.getId()); properties.setProperty(group.getId() + ".name", (group.getName() == null ? "" : group.getName())); @@ -624,7 +624,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE // // Iterate its PDPs // - List pdps = new ArrayList(); + List pdps = new ArrayList<>(); for (PDP pdp : group.getPdps()) { pdps.add(pdp.getId()); properties.setProperty(pdp.getId() + ".name", (pdp.getName() == null ? "" : pdp.getName())); @@ -717,7 +717,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE if (group.getPdps().size() == 1) { pdpList = group.getPdps().iterator().next().getId(); } else if (group.getPdps().size() > 1) { - Set ids = new HashSet(); + Set ids = new HashSet<>(); for (PDP pdp : group.getPdps()) { ids.add(pdp.getId()); } @@ -792,7 +792,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE @Override public Set getEcompPDPGroups() throws PAPException { - final Set grps = new HashSet(); + final Set grps = new HashSet<>(); for (EcompPDPGroup g : this.groups) { grps.add(g); } @@ -978,7 +978,7 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE } // The movePDP function will modify the set of PDPs in the group. // To avoid concurrent modification exceptions we need to duplicate the list before calling that function. - List pdpList = new ArrayList(); + List pdpList = new ArrayList<>(); for (EcompPDP pdp : pdps) { pdpList.add(pdp); }