Skip to content

Commit 0904ef1

Browse files
committed
Squash some SpotBugs warnings
1 parent ad19bdc commit 0904ef1

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/main/java/com/rabbitmq/client/amqp/impl/FastUtilIntComparator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package com.rabbitmq.client.amqp.impl;
1919

2020

21+
import java.io.Serializable;
2122
import java.util.Comparator;
2223

2324
/**
@@ -31,7 +32,7 @@
3132
* @see Comparator
3233
*/
3334
@FunctionalInterface
34-
interface FastUtilIntComparator {
35+
interface FastUtilIntComparator extends Serializable {
3536
/**
3637
* Compares its two primitive-type arguments for order. Returns a negative integer, zero, or a
3738
* positive integer as the first argument is less than, equal to, or greater than the second.

src/main/java/com/rabbitmq/client/amqp/impl/FastUtilSwapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616

1717
package com.rabbitmq.client.amqp.impl;
1818

19+
import java.io.Serializable;
20+
1921
/** An object that can swap elements whose position is specified by integers.
2022
*
2123
* @see Arrays#quickSort(int, int, it.unimi.dsi.fastutil.ints.IntComparator, Swapper)
2224
*/
2325
@FunctionalInterface
24-
interface FastUtilSwapper {
26+
interface FastUtilSwapper extends Serializable {
2527

2628
/** Swaps the data at the given positions.
2729
*

src/main/java/com/rabbitmq/client/amqp/impl/SerialNumberUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
1818
package com.rabbitmq.client.amqp.impl;
1919

20+
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
2021
import java.util.*;
2122
import java.util.function.ToLongFunction;
2223

@@ -90,7 +91,11 @@ static int compare(long s1, long s2) {
9091

9192
private static class SerialNumberComparator<T> implements FastUtilIntComparator {
9293

94+
private static final long serialVersionUID = -1979133464402603205L;
95+
9396
private final List<T> list;
97+
98+
@SuppressFBWarnings("SE_BAD_FIELD")
9499
private final ToLongFunction<T> serialNumberExtractor;
95100

96101
private SerialNumberComparator(List<T> list, ToLongFunction<T> serialNumberExtractor) {
@@ -108,6 +113,7 @@ public int compare(int k1, int k2) {
108113

109114
private static final class ListSwapper<T> implements FastUtilSwapper {
110115

116+
private static final long serialVersionUID = -4992779583870196665L;
111117
private final List<T> list;
112118

113119
private ListSwapper(List<T> list) {

0 commit comments

Comments
 (0)