[ONOS-8034] ArrayList initialized inside loop

Arraylist is initialized again and again hence alreadyHandled deviceIds are lost

Change-Id: I3d73084d199ae49440f0f25a205545150c7300b2
diff --git a/apps/cfm/app/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/impl/CfmMepManager.java b/apps/cfm/app/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/impl/CfmMepManager.java
index e641f3c..365f1b3 100644
--- a/apps/cfm/app/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/impl/CfmMepManager.java
+++ b/apps/cfm/app/src/main/java/org/onosproject/incubator/net/l2monitoring/cfm/impl/CfmMepManager.java
@@ -244,6 +244,7 @@
         //Iterate through all other devices and remove as a Remote Mep
         int mepsOnMdCount = 0;
         int mepsOnMaCount = 0;
+        List<DeviceId> alreadyHandledDevices = new ArrayList<>();
         for (Mep mep : mepStore.getAllMeps()) {
             if (mep.deviceId().equals(mepDeviceId) && mdName.equals(mep.mdId())) {
                 mepsOnMdCount++;
@@ -251,7 +252,6 @@
                     mepsOnMaCount++;
                 }
             }
-            List<DeviceId> alreadyHandledDevices = new ArrayList<>();
             if (mep.deviceId().equals(mepDeviceId) || !mep.mdId().equals(mdName) ||
                     !mep.maId().equals(maName) ||
                     alreadyHandledDevices.contains(mep.deviceId())) {