From: Robert Varga Date: Thu, 2 Mar 2023 11:28:10 +0000 (+0100) Subject: Fix a SpotBugs warning X-Git-Tag: v7.0.5~68 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=a0885a6c167d7da7ed60971c0736f2106074d649 Fix a SpotBugs warning The implementation of queue in KryoIOPool is always ConcurrentLinkedQueue, which never returns false. Fix the declaration to make that clear to SpotBugs. JIRA: CONTROLLER-2071 Change-Id: I0c0dee29224e128413bec9cda903610dbf137feb Signed-off-by: Robert Varga --- diff --git a/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/KryoIOPool.java b/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/KryoIOPool.java index 0f40cfcc1e..c9b0e270b6 100644 --- a/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/KryoIOPool.java +++ b/third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/KryoIOPool.java @@ -16,13 +16,12 @@ package io.atomix.utils.serializer; import java.lang.ref.SoftReference; -import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.function.Function; abstract class KryoIOPool { - private final Queue> queue = new ConcurrentLinkedQueue<>(); + private final ConcurrentLinkedQueue> queue = new ConcurrentLinkedQueue<>(); private T borrow(final int bufferSize) { T element;