Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Closeable & Flushable in JsonGenerator and JsonParser #540

Merged
merged 2 commits into from Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -22,6 +22,8 @@
import com.google.api.client.util.Preconditions;
import com.google.api.client.util.Types;

import java.io.Closeable;
import java.io.Flushable;
import java.io.IOException;
import java.lang.reflect.Field;
import java.math.BigDecimal;
Expand All @@ -39,7 +41,7 @@
* @since 1.3
* @author Yaniv Inbar
*/
public abstract class JsonGenerator {
public abstract class JsonGenerator implements Closeable, Flushable {

/** Returns the JSON factory from which this generator was created. */
public abstract JsonFactory getFactory();
Expand Down
Expand Up @@ -24,6 +24,7 @@
import com.google.api.client.util.Sets;
import com.google.api.client.util.Types;

import java.io.Closeable;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
Expand Down Expand Up @@ -60,7 +61,7 @@
* @since 1.3
* @author Yaniv Inbar
*/
public abstract class JsonParser {
public abstract class JsonParser implements Closeable {

/**
* Maps a polymorphic {@link Class} to its {@link Field} with the {@link JsonPolymorphicTypeMap}
Expand Down