code: public BlockBuilder closeEntryStrict()
              throws DuplicateMapKeyException
      {
          if (!currentEntryOpened) {
              throw new IllegalStateException("Expected entry to be opened but was closed");
          }
  
          entryAdded(false);
          currentEntryOpened = false;
  
          ensureHashTableSize();
          int previousAggregatedEntryCount = offsets[positionCount - 1];
          int aggregatedEntryCount = offsets[positionCount];
          int entryCount = aggregatedEntryCount - previousAggregatedEntryCount;
          Optional<int[]> rawHashTables = hashTables.get();
          verify(rawHashTables.isPresent(), "rawHashTables is empty");
          buildHashTableStrict(
                  keyBlockBuilder,
                  previousAggregatedEntryCount,
                  entryCount,
                  keyBlockEquals,
                  keyBlockHashCode,
                  rawHashTables.get(),
                  previousAggregatedEntryCount * HASH_MULTIPLIER,
                  entryCount * HASH_MULTIPLIER);
          return this;
      }
docs: This method will check duplicate keys and close entry.
  <p>
  When duplicate keys are discovered, the block is guaranteed to be in
  a consistent state before {@link DuplicateMapKeyException} is thrown.
  In other words, one can continue to use this BlockBuilder.