MCPcopy
hub / github.com/google/gson / nextNull

Method nextNull

gson/src/main/java/com/google/gson/stream/JsonReader.java:1006–1017  ·  view source on GitHub ↗

Consumes the next token from the JSON stream and asserts that it is a literal null. @throws IllegalStateException if the next token is not a JSON null.

()

Source from the content-addressed store, hash-verified

1004 * @throws IllegalStateException if the next token is not a JSON null.
1005 */
1006 public void nextNull() throws IOException {
1007 int p = peeked;
1008 if (p == PEEKED_NONE) {
1009 p = doPeek();
1010 }
1011 if (p == PEEKED_NULL) {
1012 peeked = PEEKED_NONE;
1013 pathIndices[stackSize - 1]++;
1014 } else {
1015 throw unexpectedTokenError("null");
1016 }
1017 }
1018
1019 /**
1020 * Returns the {@link JsonToken#NUMBER double} value of the next token, consuming it. If the next

Callers 11

pathMethod · 0.95
testMixedCaseLiteralsMethod · 0.95
assertDocumentMethod · 0.95
readTokenMethod · 0.45
readMethod · 0.45
readMethod · 0.45
readMethod · 0.45

Calls 2

doPeekMethod · 0.95
unexpectedTokenErrorMethod · 0.95

Tested by 8

pathMethod · 0.76
testMixedCaseLiteralsMethod · 0.76
assertDocumentMethod · 0.76
readMethod · 0.36