From: Robert Varga Date: Tue, 4 Aug 2020 19:05:46 +0000 (+0200) Subject: Fix safety warnings X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F91867%2F5;p=netvirt.git Fix safety warnings 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 --- diff --git a/ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/VirtualNetwork.java b/ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/VirtualNetwork.java index 5ab7532863..1c804ba93f 100644 --- a/ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/VirtualNetwork.java +++ b/ipv6service/impl/src/main/java/org/opendaylight/netvirt/ipv6service/VirtualNetwork.java @@ -122,18 +122,15 @@ public class VirtualNetwork implements IVirtualNetwork { } public static class DpnInterfaceInfo { - Uint64 dpId; - int rsPuntFlowConfigured; - final Set subnetCidrPuntFlowList = ConcurrentHashMap.newKeySet(); + private Uint64 dpId; + private int rsPuntFlowConfigured = Ipv6ServiceConstants.FLOWS_NOT_CONFIGURED; + private final Set subnetCidrPuntFlowList = ConcurrentHashMap.newKeySet(); final Set ndTargetFlowsPunted = ConcurrentHashMap.newKeySet(); - ConcurrentMap ofPortMap; - ConcurrentMap ovsNaResponderFlowConfigured; + final ConcurrentMap ofPortMap = new ConcurrentHashMap<>(); + private final ConcurrentMap ovsNaResponderFlowConfigured = new ConcurrentHashMap<>(); DpnInterfaceInfo(Uint64 dpnId) { dpId = dpnId; - ofPortMap = new ConcurrentHashMap(); - rsPuntFlowConfigured = Ipv6ServiceConstants.FLOWS_NOT_CONFIGURED; - ovsNaResponderFlowConfigured = new ConcurrentHashMap(); } public void setDpId(Uint64 dpId) {