protonj2/src/main/java/org/apache/qpid/protonj2/buffer/impl/ProtonByteArrayBuffer.java [974:1006]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void checkPeek() {
        if (readOffset == writeOffset) {
            if (closed) {
                throw ProtonBufferUtils.genericBufferIsClosed(this);
            } else {
                throw ProtonBufferUtils.genericOutOfBounds(this, readOffset);
            }
        }
    }

    private void checkRead(int index, int size) {
        if (index < 0 || writeOffset < index + size || closed) {
            if (closed) {
                throw ProtonBufferUtils.genericBufferIsClosed(this);
            } else {
                throw ProtonBufferUtils.genericOutOfBounds(this, index);
            }
        }
    }

    private void checkGet(int index, int size) {
        if (index < 0 || readCapacity < index + size) {
            if (closed) {
                throw ProtonBufferUtils.genericBufferIsClosed(this);
            } else {
                throw ProtonBufferUtils.genericOutOfBounds(this, index);
            }
        }
    }

    private void checkSet(int index, int size) {
        if (index < 0 || writeCapacity < index + size) {
            expandOrThrowError(index, size, false);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



protonj2/src/main/java/org/apache/qpid/protonj2/buffer/netty/Netty4ToProtonBufferAdapter.java [1044:1076]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void checkPeek() {
        if (readOffset == writeOffset) {
            if (closed) {
                throw ProtonBufferUtils.genericBufferIsClosed(this);
            } else {
                throw ProtonBufferUtils.genericOutOfBounds(this, readOffset);
            }
        }
    }

    private void checkRead(int index, int size) {
        if (index < 0 || writeOffset < index + size || closed) {
            if (closed) {
                throw ProtonBufferUtils.genericBufferIsClosed(this);
            } else {
                throw ProtonBufferUtils.genericOutOfBounds(this, index);
            }
        }
    }

    private void checkGet(int index, int size) {
        if (index < 0 || readCapacity < index + size) {
            if (closed) {
                throw ProtonBufferUtils.genericBufferIsClosed(this);
            } else {
                throw ProtonBufferUtils.genericOutOfBounds(this, index);
            }
        }
    }

    private void checkSet(int index, int size) {
        if (index < 0 || writeCapacity < index + size) {
            expandOrThrowError(index, size, false);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



