Fix raw type warnings in HwvtepHACache 53/92753/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 28 Sep 2020 10:50:29 +0000 (12:50 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 28 Sep 2020 10:50:29 +0000 (12:50 +0200)
ConcurrentMap should have proper types here, eliminating a few
warnings.

Change-Id: Id3fe51e3acc7b20317f0b2cfb97fcf555e7620b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
mdsalutil/mdsalutil-api/src/main/java/org/opendaylight/genius/utils/hwvtep/HwvtepHACache.java

index 5a11e934af2fd03a23b54e5b4412eb02f7873b41..fc5119a2b51711bc20c42baee424795c44f8f4c6 100644 (file)
@@ -44,8 +44,8 @@ public class HwvtepHACache {
     private final ConcurrentHashMap<String, Boolean> connectedNodes = new ConcurrentHashMap<>();
 
     private final LinkedBlockingQueue<DebugEvent> debugEvents = new LinkedBlockingQueue<>(MAX_EVENT_BUFFER_SIZE);
-    private Map<InstanceIdentifier<Node>, IpAddress> tepIps = new ConcurrentHashMap();
-    private Map<IpAddress, InstanceIdentifier<Node>> nodeIds = new ConcurrentHashMap();
+    private final Map<InstanceIdentifier<Node>, IpAddress> tepIps = new ConcurrentHashMap<>();
+    private final Map<IpAddress, InstanceIdentifier<Node>> nodeIds = new ConcurrentHashMap<>();
 
     public HwvtepHACache() {
     }
@@ -67,11 +67,11 @@ public class HwvtepHACache {
     }
 
     public IpAddress getTepIpOfNode(InstanceIdentifier<Node> iid) {
-        return (IpAddress)this.tepIps.get(iid);
+        return this.tepIps.get(iid);
     }
 
     public InstanceIdentifier<Node> getNodeIdFromTepIp(IpAddress ipAddress) {
-        return (InstanceIdentifier)this.nodeIds.get(ipAddress);
+        return this.nodeIds.get(ipAddress);
     }
 
     public void setTepIpOfNode(InstanceIdentifier<Node> iid, IpAddress ipAddress) {