Add CheckReturnValue annotation to peekJson. (#736)

* Add CheckReturnValue annotation to peekJson.

* Suppress test warning.
This commit is contained in:
Eric Cochran
2018-11-08 12:41:45 -08:00
committed by Jesse Wilson
parent 103ae3cec6
commit 878b3ff93b
2 changed files with 2 additions and 1 deletions

View File

@@ -497,7 +497,7 @@ public abstract class JsonReader implements Closeable {
* jsonReader.nextInt() // Returns 456, reader contains 789 and ]. * jsonReader.nextInt() // Returns 456, reader contains 789 and ].
* }</pre> * }</pre>
*/ */
public abstract JsonReader peekJson(); @CheckReturnValue public abstract JsonReader peekJson();
/** /**
* Returns a <a href="http://goessner.net/articles/JsonPath/">JsonPath</a> to * Returns a <a href="http://goessner.net/articles/JsonPath/">JsonPath</a> to

View File

@@ -38,6 +38,7 @@ import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue; import static org.junit.Assume.assumeTrue;
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
@SuppressWarnings("CheckReturnValue")
public final class JsonReaderTest { public final class JsonReaderTest {
@Parameter public JsonCodecFactory factory; @Parameter public JsonCodecFactory factory;