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

Method endArray

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

Consumes the next token from the JSON stream and asserts that it is the end of the current array. @throws IllegalStateException if the next token is not the end of an array.

()

Source from the content-addressed store, hash-verified

476 * @throws IllegalStateException if the next token is not the end of an array.
477 */
478 public void endArray() throws IOException {
479 int p = peeked;
480 if (p == PEEKED_NONE) {
481 p = doPeek();
482 }
483 if (p == PEEKED_END_ARRAY) {
484 stackSize--;
485 pathIndices[stackSize - 1]++;
486 peeked = PEEKED_NONE;
487 } else {
488 throw unexpectedTokenError("END_ARRAY");
489 }
490 }
491
492 /**
493 * Consumes the next token from the JSON stream and asserts that it is the beginning of a new

Callers 15

testReadMixedStreamedMethod · 0.95
pathMethod · 0.95
arrayPathMethod · 0.95
skipEndOfDocumentMethod · 0.95
arrayOfObjectsMethod · 0.95
arrayOfArraysMethod · 0.95
testReadArrayMethod · 0.95
testReadEmptyArrayMethod · 0.95
testHelloWorldMethod · 0.95

Calls 2

doPeekMethod · 0.95
unexpectedTokenErrorMethod · 0.95

Tested by 15

testReadMixedStreamedMethod · 0.76
pathMethod · 0.76
arrayPathMethod · 0.76
skipEndOfDocumentMethod · 0.76
arrayOfObjectsMethod · 0.76
arrayOfArraysMethod · 0.76
testReadArrayMethod · 0.76
testReadEmptyArrayMethod · 0.76
testHelloWorldMethod · 0.76
testDoublesMethod · 0.76