X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=PolicyEngineAPI%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fstd%2FStdPolicyEngine.java;h=5b10f306628999f04e1d1646b14adc80406b85b9;hp=abe5ee7673e4a8184629623b5e01f515e054d7cb;hb=87c95be02a8a4d77e165dede90777e811b59dcae;hpb=7e547eaa55920dfbc9691eab33bb728395b50cf2 diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java index abe5ee767..5b10f3066 100644 --- a/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java +++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/std/StdPolicyEngine.java @@ -97,9 +97,9 @@ import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import org.xml.sax.InputSource; -import com.att.aft.dme2.internal.gson.Gson; -import com.att.aft.dme2.internal.gson.GsonBuilder; import com.fasterxml.jackson.core.JsonProcessingException; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; /** * PolicyEngine Implementation class @@ -565,7 +565,7 @@ public class StdPolicyEngine { public Collection getConfigImpl(ConfigRequestParameters configRequestParameters) throws PolicyConfigException{ String resource= "getConfig"; - ArrayList response = new ArrayList(); + ArrayList response = new ArrayList<>(); String body = new String(); // Create Request. try { @@ -598,7 +598,7 @@ public class StdPolicyEngine { } private ArrayList configResult(APIPolicyConfigResponse[] response) throws PolicyConfigException { - ArrayList result = new ArrayList(); + ArrayList result = new ArrayList<>(); if(response!=null && response.length>0){ for(APIPolicyConfigResponse policyConfigResponse: response){ StdPolicyConfig policyConfig = new StdPolicyConfig(); @@ -647,7 +647,7 @@ public class StdPolicyEngine { private void setMatches(Map matchingConditions) { Matches match = new Matches(); - HashMap configAttributes = new HashMap(); + HashMap configAttributes = new HashMap<>(); try{ for(String key: matchingConditions.keySet()){ if(key.equalsIgnoreCase("ECOMPName")){ @@ -741,7 +741,7 @@ public class StdPolicyEngine { } public Collection listConfigImpl(ConfigRequestParameters listRequestParameters) throws PolicyConfigException{ - Collection policyList = new ArrayList(); + Collection policyList = new ArrayList<>(); if (junit){ policyList.add("Policy Name: listConfigTest"); return policyList; @@ -796,7 +796,7 @@ public class StdPolicyEngine { } private ArrayList eventResult(StdPolicyResponse[] response) throws PolicyEventException{ - ArrayList eventResult = new ArrayList(); + ArrayList eventResult = new ArrayList<>(); if(response!=null && response.length>0){ for(StdPolicyResponse policyConfigResponse: response){ eventResult.add(policyConfigResponse); @@ -860,7 +860,7 @@ public class StdPolicyEngine { typeDefault = new ArrayList(Arrays.asList(prop.getProperty("NOTIFICATION_TYPE").split(","))); notificationType = typeDefault; } else { - notificationType = new ArrayList(); + notificationType = new ArrayList<>(); notificationType.add(check_type); } } @@ -873,7 +873,7 @@ public class StdPolicyEngine { if(serverList.contains(",")) { notificationURLList = new ArrayList(Arrays.asList(serverList.split(","))); } else { - notificationURLList = new ArrayList(); + notificationURLList = new ArrayList<>(); notificationURLList.add(serverList); } } @@ -911,8 +911,8 @@ public class StdPolicyEngine { environment = Environment.DEVL.toString(); } // Initializing the values. - pdps = new ArrayList(); - encoding = new ArrayList(); + pdps = new ArrayList<>(); + encoding = new ArrayList<>(); // Check the Keys for PDP_URLs Collection unsorted = prop.keySet(); @SuppressWarnings({ "rawtypes", "unchecked" })