Remove use of internal Netty class 63/80163/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Feb 2019 16:53:18 +0000 (17:53 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 6 Feb 2019 14:32:16 +0000 (15:32 +0100)
Java 8 offers ConcurrentHashMap.newKeySet(), which returns
a concurrent set. Use that instead of Netty's internal class.

Change-Id: I1be0dd7325aa8f3c9dc604afebe55f30221d37a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceManagerImpl.java

index 2b41c2dc1baf15d94db924c0aad1dcfeb914776f..8077678966108c2f55031a676c3e4c737d8694f9 100644 (file)
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2015, 2017 Cisco Systems, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
@@ -9,7 +9,6 @@ package org.opendaylight.openflowplugin.impl.device;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import io.netty.util.HashedWheelTimer;
-import io.netty.util.internal.ConcurrentSet;
 import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -59,7 +58,8 @@ public class DeviceManagerImpl implements DeviceManager, ExtensionConverterProvi
     private final DeviceInitializerProvider deviceInitializerProvider;
     private final ConvertorExecutor convertorExecutor;
     private final ConcurrentMap<DeviceInfo, DeviceContext> deviceContexts = new ConcurrentHashMap<>();
-    private final Set<KeyedInstanceIdentifier<Node, NodeKey>> notificationCreateNodeSend = new ConcurrentSet<>();
+    private final Set<KeyedInstanceIdentifier<Node, NodeKey>> notificationCreateNodeSend =
+            ConcurrentHashMap.newKeySet();
     private final NotificationPublishService notificationPublishService;
     private final MessageSpy messageSpy;
     private final HashedWheelTimer hashedWheelTimer;