Plz
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Johannes Frohnmeyer 2022-11-24 18:46:44 +01:00
parent b357260039
commit 29e5634ce8
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.google.gson.jf;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.stream.JsonReader;
import junit.framework.TestCase;
import java.io.*;
@ -10,7 +11,7 @@ public class ReadNullTest extends TestCase {
public void testReadNull() throws IOException {
Gson gson = new GsonBuilder().serializeNulls().setLenient().create();
String exampleFile = "{\n // Yes\n \"value1\": 1024,\n \"value2\": null,\n \"value3\": 10\n}";
try (Reader r = new StringReader(exampleFile); var jr = gson.newJsonReader(r)) {
try (Reader r = new StringReader(exampleFile); JsonReader jr = gson.newJsonReader(r)) {
jr.beginObject();
assertEquals("value1", jr.nextName());
assertEquals(1024, jr.nextInt());