diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java index 2b716664806..461949f6dfc 100644 --- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java +++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/util/collections/ConcurrentLongHashMap.java @@ -317,7 +317,29 @@ public interface EntryProcessor { // previous design had to paper over with Math.min(keys.length, values.length). @SuppressWarnings("serial") private static final class Section extends StampedLock { - private record Table(long[] keys, V[] values, int capacity) { } + private static final class Table { + private final long[] keys; + private final V[] values; + private final int capacity; + + Table(long[] keys, V[] values, int capacity) { + this.keys = keys; + this.values = values; + this.capacity = capacity; + } + + long[] keys() { + return keys; + } + + V[] values() { + return values; + } + + int capacity() { + return capacity; + } + } // Section is Serializable only by inheritance from StampedLock; never actually serialized. @SuppressFBWarnings("SE_BAD_FIELD")