Fix safety warnings 67/91867/5
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 4 Aug 2020 19:05:46 +0000 (21:05 +0200)
committerStephen Kitt <skitt@redhat.com>
Fri, 25 Sep 2020 09:18:22 +0000 (09:18 +0000)
Minimize visibility of DpnInterfaceInfo fields and use proper type
generic arguments to prevent use of raw types.

Change-Id: Id12ef7a9ca44e662a5b794f1c81ad7cc541bb44b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/VirtualNetwork.java

index 5ab75328638971da67393dd5630e48269c9e4e7a..1c804ba93fbec3832ac54463f4b098151e2d1b91 100644 (file)
@@ -122,18 +122,15 @@ public class VirtualNetwork implements IVirtualNetwork {
     }
 
     public static class DpnInterfaceInfo {
-        Uint64 dpId;
-        int rsPuntFlowConfigured;
-        final Set<Uuid> subnetCidrPuntFlowList = ConcurrentHashMap.newKeySet();
+        private Uint64 dpId;
+        private int rsPuntFlowConfigured = Ipv6ServiceConstants.FLOWS_NOT_CONFIGURED;
+        private final Set<Uuid> subnetCidrPuntFlowList = ConcurrentHashMap.newKeySet();
         final Set<Ipv6Address> ndTargetFlowsPunted = ConcurrentHashMap.newKeySet();
-        ConcurrentMap<Long, Uuid> ofPortMap;
-        ConcurrentMap<Uuid, Integer> ovsNaResponderFlowConfigured;
+        final ConcurrentMap<Long, Uuid> ofPortMap = new ConcurrentHashMap<>();
+        private final ConcurrentMap<Uuid, Integer> ovsNaResponderFlowConfigured = new ConcurrentHashMap<>();
 
         DpnInterfaceInfo(Uint64 dpnId) {
             dpId = dpnId;
-            ofPortMap = new ConcurrentHashMap();
-            rsPuntFlowConfigured = Ipv6ServiceConstants.FLOWS_NOT_CONFIGURED;
-            ovsNaResponderFlowConfigured = new ConcurrentHashMap();
         }
 
         public void setDpId(Uint64 dpId) {