INNER CODE UNIT · Java

readEndArray

mongodb/mongo-java-driver · bson/src/main/org/bson/AbstractBsonReader.java:322

    public void readEndArray() {
        if (isClosed()) {
            throw new IllegalStateException("BsonReader is closed");
        }
        if (getContext().getContextType() != BsonContextType.ARRAY) {
            throwInvalidContextType("readEndArray", getContext().getContextType(), BsonContextType.ARRAY);
        }
        if (getState() == State.TYPE) {
            readBsonType(); // will set state to EndOfArray if at end of array
        }
        if (getState() != State.END_OF_ARRAY) {
            throwInvalidState("ReadEndArray", State.END_OF_ARRAY);
        }

        doReadEndArray();

        setStateOnEnd();
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…