Skip to content

Commit 2e3b2c6

Browse files
committed
Make comparator implement serializable
To make spotbugs happy.
1 parent 36ce485 commit 2e3b2c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

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

20+
import java.io.Serializable;
2021
import java.util.*;
2122
import java.util.function.Function;
2223

@@ -86,7 +87,9 @@ static int compare(long s1, long s2) {
8687
throw new IllegalArgumentException("Cannot compare serial numbers " + s1 + " and " + s2);
8788
}
8889

89-
private static class SerialNumberComparator implements Comparator<Long> {
90+
private static class SerialNumberComparator implements Comparator<Long>, Serializable {
91+
92+
private static final long serialVersionUID = -584535356973875111L;
9093

9194
@Override
9295
public int compare(Long o1, Long o2) {

0 commit comments

Comments
 (0)