Switch types to be final.

This commit is contained in:
Jake Wharton 2015-04-12 14:29:18 -04:00
parent 41b3b0acde
commit 9fedfc8066
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ import java.util.List;
* Converts arrays to JSON arrays containing their converted contents. This
* supports both primitive and object arrays.
*/
class ArrayJsonAdapter extends JsonAdapter<Object> {
final class ArrayJsonAdapter extends JsonAdapter<Object> {
public static final Factory FACTORY = new Factory() {
@Override public JsonAdapter<?> create(Type type, AnnotatedElement annotations, Moshi moshi) {
Type elementType = Types.arrayComponentType(type);

View file

@ -173,7 +173,7 @@ import okio.Source;
* <p>Each {@code JsonReader} may be used to read a single JSON stream. Instances
* of this class are not thread safe.
*/
public class JsonReader implements Closeable {
public final class JsonReader implements Closeable {
private static final long MIN_INCOMPLETE_INTEGER = Long.MIN_VALUE / 10;
private static final ByteString SINGLE_QUOTE_OR_SLASH = ByteString.encodeUtf8("'\\");

View file

@ -124,7 +124,7 @@ import static com.squareup.moshi.JsonScope.NONEMPTY_OBJECT;
* Instances of this class are not thread safe. Calls that would result in a
* malformed JSON string will fail with an {@link IllegalStateException}.
*/
public class JsonWriter implements Closeable, Flushable {
public final class JsonWriter implements Closeable, Flushable {
/*
* From RFC 4627, "All Unicode characters may be placed within the