Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,29 @@ public interface EntryProcessor<V> {
// previous design had to paper over with Math.min(keys.length, values.length).
@SuppressWarnings("serial")
private static final class Section<V> extends StampedLock {
private record Table<V>(long[] keys, V[] values, int capacity) { }
private static final class Table<V> {
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")
Expand Down
Loading