Remove a FindBugs suppression 28/81328/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Mar 2019 20:21:06 +0000 (21:21 +0100)
committerRobert Varga <nite@hq.sk>
Fri, 29 Mar 2019 16:56:20 +0000 (16:56 +0000)
Use Deque.remove() keeps SpotBugs happy, and does not change
anything, as we know the queue is non-empty at this point.

Change-Id: I307dd22eb9a2a56a9a18490ff1e45aa6d4f2a5e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 998aca7de4bc5ceff15646acefd6be3ed46ca260)

netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java

index ce1e5ef0a0541af78a131324987fc36f76a91cc4..b13e05b8b4304b3b746cb8bd0cfc1472c5e6eb8f 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.netconf.client;
 
 import com.google.common.base.Preconditions;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import io.netty.util.concurrent.Future;
 import io.netty.util.concurrent.GlobalEventExecutor;
 import io.netty.util.concurrent.Promise;
@@ -41,7 +40,6 @@ public class SimpleNetconfClientSessionListener implements NetconfClientSessionL
     private NetconfClientSession clientSession;
 
     @GuardedBy("this")
-    @SuppressFBWarnings("RV_RETURN_VALUE_IGNORED")
     private void dispatchRequest() {
         while (!requests.isEmpty()) {
             final RequestEntry e = requests.peek();
@@ -52,7 +50,7 @@ public class SimpleNetconfClientSessionListener implements NetconfClientSessionL
             }
 
             LOG.debug("Message {} has been cancelled, skipping it", e.request);
-            requests.poll();
+            requests.remove();
         }
     }