Fix size check assertion

This commit is contained in:
Andrea Cavalli 2021-09-23 02:22:30 +02:00
parent 29086b1939
commit 552b5f78ce

View File

@ -250,9 +250,11 @@ public class DatabaseMapDictionaryDeep<T, U, US extends DatabaseStage<U>> implem
* Removes the prefix from the key * Removes the prefix from the key
*/ */
protected void removePrefix(Buffer key) { protected void removePrefix(Buffer key) {
assert key.readableBytes() == keyPrefixLength + keySuffixLength + keyExtLength; assert key.readableBytes() == keyPrefixLength + keySuffixLength + keyExtLength
|| key.readableBytes() == keyPrefixLength + keySuffixLength;
key.readerOffset(key.readerOffset() + this.keyPrefixLength).compact(); key.readerOffset(key.readerOffset() + this.keyPrefixLength).compact();
assert key.readableBytes() == keySuffixLength + keyExtLength; assert key.readableBytes() == keySuffixLength + keyExtLength
|| key.readableBytes() == keySuffixLength;
} }
/** /**