Bugfix
This commit is contained in:
parent
bd5cd09b2e
commit
bc12b22a4b
@ -66,8 +66,10 @@ public class DatabaseMapDictionaryHashed<T, U, TH> implements DatabaseStageMap<T
|
|||||||
public @NotNull Entry<T, U> deserialize(@NotNull ByteBuf serialized) {
|
public @NotNull Entry<T, U> deserialize(@NotNull ByteBuf serialized) {
|
||||||
try {
|
try {
|
||||||
int keySuffixLength = serialized.readInt();
|
int keySuffixLength = serialized.readInt();
|
||||||
T keySuffix = keySuffixSerializer.deserialize(serialized.retainedSlice(serialized.readerIndex(), keySuffixLength));
|
int initialReaderIndex = serialized.readerIndex();
|
||||||
U value = valueSerializer.deserialize(serialized.retain());
|
T keySuffix = keySuffixSerializer.deserialize(serialized.retain());
|
||||||
|
assert serialized.readerIndex() <= initialReaderIndex + keySuffixLength;
|
||||||
|
U value = valueSerializer.deserialize(serialized.readerIndex(initialReaderIndex + keySuffixLength).retain());
|
||||||
return Map.entry(keySuffix, value);
|
return Map.entry(keySuffix, value);
|
||||||
} finally {
|
} finally {
|
||||||
serialized.release();
|
serialized.release();
|
||||||
|
Loading…
Reference in New Issue
Block a user