Fix a SpotBugs warning 13/104713/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Mar 2023 11:28:10 +0000 (12:28 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Mar 2023 11:28:57 +0000 (12:28 +0100)
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 <robert.varga@pantheon.tech>
third-party/atomix/storage/src/main/java/io/atomix/utils/serializer/KryoIOPool.java

index 0f40cfcc1e40747e8896c12d74510d0d807acb49..c9b0e270b6690977a40e4f99122e06520813862f 100644 (file)
 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<T> {
 
-  private final Queue<SoftReference<T>> queue = new ConcurrentLinkedQueue<>();
+  private final ConcurrentLinkedQueue<SoftReference<T>> queue = new ConcurrentLinkedQueue<>();
 
   private T borrow(final int bufferSize) {
     T element;