mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Add CheckReturnValue annotation to peekJson. (#736)
* Add CheckReturnValue annotation to peekJson. * Suppress test warning.
This commit is contained in:
committed by
Jesse Wilson
parent
103ae3cec6
commit
878b3ff93b
@@ -497,7 +497,7 @@ public abstract class JsonReader implements Closeable {
|
||||
* jsonReader.nextInt() // Returns 456, reader contains 789 and ].
|
||||
* }</pre>
|
||||
*/
|
||||
public abstract JsonReader peekJson();
|
||||
@CheckReturnValue public abstract JsonReader peekJson();
|
||||
|
||||
/**
|
||||
* Returns a <a href="http://goessner.net/articles/JsonPath/">JsonPath</a> to
|
||||
|
@@ -38,6 +38,7 @@ import static org.junit.Assert.fail;
|
||||
import static org.junit.Assume.assumeTrue;
|
||||
|
||||
@RunWith(Parameterized.class)
|
||||
@SuppressWarnings("CheckReturnValue")
|
||||
public final class JsonReaderTest {
|
||||
@Parameter public JsonCodecFactory factory;
|
||||
|
||||
|
Reference in New Issue
Block a user