From: Robert Varga Date: Thu, 28 Mar 2019 20:21:06 +0000 (+0100) Subject: Remove a FindBugs suppression X-Git-Tag: release/neon-sr1~10 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=6c911783fcdac163bb6efc8ff7dbf56cbfb2ad22;p=netconf.git 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) --- 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(); } }