From ca8bd9ab89b808ea1008ccf07c389097430bc911 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 8 Dec 2016 10:34:26 +0100 Subject: [PATCH] Remove FB suppression Using .remove() instead of .poll() makes FB shut up, because the return value is not used for signalling queue state. Change-Id: I0aefc0eb7ede948b8311d12c6307137532018386 Signed-off-by: Robert Varga --- .../controller/cluster/datastore/ShardDataTree.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java index 5b015ead9a..8832cd6d1f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java @@ -749,7 +749,6 @@ public class ShardDataTree extends ShardDataTreeTransactionParent { } } - @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED", justification = "See inline comment below.") void startAbort(final SimpleShardDataTreeCohort cohort) { final Iterator it = pendingTransactions.iterator(); if (!it.hasNext()) { @@ -764,10 +763,7 @@ public class ShardDataTree extends ShardDataTreeTransactionParent { LOG.debug("{}: aborted head of queue {} in state {}", logContext, cohort.getIdentifier(), cohort.getIdentifier()); - // The suppression of the FindBugs "RV_RETURN_VALUE_IGNORED" warning pertains to this line. In - // this case, we've already obtained the head of the queue above via the Iterator and we just want to - // remove it here. - pendingTransactions.poll(); + pendingTransactions.remove(); processNextTransaction(); } else { LOG.warn("{}: transaction {} is committing, skipping abort", logContext, cohort.getIdentifier()); -- 2.36.6