Merge pull request #1072 from NightlyNexus/eric/2017.04.22-synthetic

Remove need for synthetic accessor methods.
This commit is contained in:
Jake Wharton 2017-04-22 20:44:27 -05:00 committed by GitHub
commit 09cbc8073b
3 changed files with 3 additions and 3 deletions

View File

@ -111,7 +111,7 @@ public abstract class UnsafeAllocator {
* throw an {@link java.lang.UnsupportedOperationException} * throw an {@link java.lang.UnsupportedOperationException}
* @param c instance of the class to be checked * @param c instance of the class to be checked
*/ */
private static void assertInstantiable(Class<?> c) { static void assertInstantiable(Class<?> c) {
int modifiers = c.getModifiers(); int modifiers = c.getModifiers();
if (Modifier.isInterface(modifiers)) { if (Modifier.isInterface(modifiers)) {
throw new UnsupportedOperationException("Interface can't be instantiated! Interface name: " + c.getName()); throw new UnsupportedOperationException("Interface can't be instantiated! Interface name: " + c.getName());

View File

@ -41,7 +41,7 @@ import java.lang.reflect.Type;
public final class TreeTypeAdapter<T> extends TypeAdapter<T> { public final class TreeTypeAdapter<T> extends TypeAdapter<T> {
private final JsonSerializer<T> serializer; private final JsonSerializer<T> serializer;
private final JsonDeserializer<T> deserializer; private final JsonDeserializer<T> deserializer;
private final Gson gson; final Gson gson;
private final TypeToken<T> typeToken; private final TypeToken<T> typeToken;
private final TypeAdapterFactory skipPast; private final TypeAdapterFactory skipPast;
private final GsonContextImpl context = new GsonContextImpl(); private final GsonContextImpl context = new GsonContextImpl();

View File

@ -1459,7 +1459,7 @@ public class JsonReader implements Closeable {
return getClass().getSimpleName() + locationString(); return getClass().getSimpleName() + locationString();
} }
private String locationString() { String locationString() {
int line = lineNumber + 1; int line = lineNumber + 1;
int column = pos - lineStart + 1; int column = pos - lineStart + 1;
return " at line " + line + " column " + column + " path " + getPath(); return " at line " + line + " column " + column + " path " + getPath();