public void checkLastTagWas(final int value) throws ProtobufException {
        if (lastTag != value) {
            throw ProtocolException.invalidEndTag();
        }
    }
Verifies that the last call to readTag() returned the given tag value. This is used to verify that a nested group
ended with the correct end tag.

@throws ProtobufException {@code value} does not match the last tag.
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/serialization/impl/protostuff/io/UnsafeNioBufInput.java