INNER CODE UNIT · Java
readDouble
mongodb/mongo-java-driver · bson/src/main/org/bson/AbstractBsonReader.java:315
public double readDouble() {
checkPreconditions("readDouble", BsonType.DOUBLE);
setState(getNextState());
return doReadDouble();
}
@Override
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) {