X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ECOMP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fpap%2Fxacml%2Frest%2Felk%2Fclient%2FPolicyElasticSearchController.java;h=a18a2295ad3ec5ba758697c9bf3c0b3d8278337e;hb=refs%2Fchanges%2F45%2F4445%2F4;hp=3a87a16ca7c58fbbdc6e29286d3a5394c1701626;hpb=7e547eaa55920dfbc9691eab33bb728395b50cf2;p=policy%2Fengine.git diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java index 3a87a16ca..a18a2295a 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java @@ -198,8 +198,8 @@ public class PolicyElasticSearchController{ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); PolicyRestAdapter policyData = new PolicyRestAdapter(); PolicyElasticSearchController controller = new PolicyElasticSearchController(); - Map searchKeyValue = new HashMap(); - List policyList = new ArrayList(); + Map searchKeyValue = new HashMap<>(); + List policyList = new ArrayList<>(); if(request.getParameter("policyName") != null){ String policyName = request.getParameter("policyName"); policyData.setNewFileName(policyName); @@ -340,7 +340,7 @@ public class PolicyElasticSearchController{ String dictionaryType = root.get("type").textValue(); Mode mode = Mode.valueOf(dictionaryType); String value; - List policyList = new ArrayList(); + List policyList = new ArrayList<>(); switch (mode){ case attribute : Attribute attributedata = (Attribute)mapper.readValue(root.get("data").toString(), Attribute.class); @@ -451,12 +451,12 @@ public class PolicyElasticSearchController{ //Search the Elk database public List searchElkDatabase(PolicyIndexType type, String key, String value){ PolicyElasticSearchController controller = new PolicyElasticSearchController(); - Map searchKeyValue = new HashMap(); + Map searchKeyValue = new HashMap<>(); if(!"pholder".equals(key)){ searchKeyValue.put(key, value); } - List policyList = new ArrayList(); + List policyList = new ArrayList<>(); JestResult policyResultList = controller.search(type, value, searchKeyValue); if(policyResultList.isSucceeded()){ JsonArray resultObject = policyResultList.getJsonObject().get("hits").getAsJsonObject().get("hits").getAsJsonArray();