From 87c95be02a8a4d77e165dede90777e811b59dcae Mon Sep 17 00:00:00 2001 From: Ravindra Bakkamanthala Date: Tue, 23 May 2017 14:56:12 -0400 Subject: Commit includes ControlLoopPolicy API and bugfixes Change-Id: I3e18bb8b4c31a0d908bb0cff4c85e2a3fb450a63 Signed-off-by: Ravindra Bakkamanthala --- .../java/org/openecomp/policy/std/NotificationStore.java | 12 ++++++------ .../main/java/org/openecomp/policy/utils/BackUpMonitor.java | 4 ++-- .../main/java/org/openecomp/policy/utils/BusPublisher.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'PolicyEngineUtils/src/main/java/org/openecomp') diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/std/NotificationStore.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/std/NotificationStore.java index 1c5950c5d..2f3a72946 100644 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/std/NotificationStore.java +++ b/PolicyEngineUtils/src/main/java/org/openecomp/policy/std/NotificationStore.java @@ -42,10 +42,10 @@ public class NotificationStore { public static StdPDPNotification getDeltaNotification(StdPDPNotification newNotification){ StdPDPNotification notificationDelta = new StdPDPNotification(); - ArrayList removedDelta = new ArrayList(); - ArrayList updatedDelta = new ArrayList(); - Collection newUpdatedPolicies = new ArrayList(); - Collection newRemovedPolicies = new ArrayList(); + ArrayList removedDelta = new ArrayList<>(); + ArrayList updatedDelta = new ArrayList<>(); + Collection newUpdatedPolicies = new ArrayList<>(); + Collection newRemovedPolicies = new ArrayList<>(); Collection oldUpdatedLostPolicies = notificationRecord.getLoadedPolicies(); Collection oldRemovedPolicies = notificationRecord.getRemovedPolicies(); Collection oldUpdatedPolicies = notificationRecord.getLoadedPolicies(); @@ -168,14 +168,14 @@ public class NotificationStore { }else{ // Check if there is anything new and update the record. if(notificationRecord.getLoadedPolicies()!=null || notificationRecord.getRemovedPolicies()!=null){ - HashSet removedPolicies = new HashSet(); + HashSet removedPolicies = new HashSet<>(); for(RemovedPolicy rPolicy: notificationRecord.getRemovedPolicies()){ StdRemovedPolicy sRPolicy = new StdRemovedPolicy(); sRPolicy.setPolicyName(rPolicy.getPolicyName()); sRPolicy.setVersionNo(rPolicy.getVersionNo()); removedPolicies.add(sRPolicy); } - HashSet updatedPolicies = new HashSet(); + HashSet updatedPolicies = new HashSet<>(); for(LoadedPolicy uPolicy: notificationRecord.getLoadedPolicies()){ StdLoadedPolicy sUPolicy = new StdLoadedPolicy(); sUPolicy.setMatches(uPolicy.getMatches()); diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BackUpMonitor.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BackUpMonitor.java index f041d105c..6f9082bc9 100644 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BackUpMonitor.java +++ b/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BackUpMonitor.java @@ -226,7 +226,7 @@ public class BackUpMonitor { em.flush(); }else{ // Check for other Master(s) - ArrayList masterEntities = new ArrayList(); + ArrayList masterEntities = new ArrayList<>(); // Check for self. BackUpMonitorEntity selfEntity = null; // Check backup monitor entities. @@ -310,7 +310,7 @@ public class BackUpMonitor { } } } - masterEntities = new ArrayList(); + masterEntities = new ArrayList<>(); masterEntities.add(masterEntity); } if(masterEntities.size()==1){ diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BusPublisher.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BusPublisher.java index 9c9e54b47..fe3e4f6eb 100644 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BusPublisher.java +++ b/PolicyEngineUtils/src/main/java/org/openecomp/policy/utils/BusPublisher.java @@ -40,7 +40,7 @@ public interface BusPublisher { String aafLogin, String aafPassword) { - ArrayList dmaapServers = new ArrayList(); + ArrayList dmaapServers = new ArrayList<>(); for (String server: servers) { dmaapServers.add(server + ":3904"); } -- cgit 1.2.3-korg