From 6c911783fcdac163bb6efc8ff7dbf56cbfb2ad22 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 28 Mar 2019 21:21:06 +0100 Subject: [PATCH] Remove a FindBugs suppression 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 (cherry picked from commit 998aca7de4bc5ceff15646acefd6be3ed46ca260) --- .../netconf/client/SimpleNetconfClientSessionListener.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java index ce1e5ef0a0..b13e05b8b4 100644 --- a/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java +++ b/netconf/netconf-client/src/main/java/org/opendaylight/netconf/client/SimpleNetconfClientSessionListener.java @@ -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(); } } -- 2.36.6