Merge pull request #738 from google/missing_field_details

Added details and causes while throwing AssertionError
This commit is contained in:
inder123 2015-11-16 14:27:49 -08:00
commit 5e3d4320cf
3 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ public final class Excluder implements TypeAdapterFactory, Cloneable {
try {
return (Excluder) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError();
throw new AssertionError(e);
}
}

View File

@ -241,7 +241,7 @@ public final class ReflectiveTypeAdapterFactory implements TypeAdapterFactory {
}
}
} catch (IllegalAccessException e) {
throw new AssertionError();
throw new AssertionError(e);
}
out.endObject();
}

View File

@ -796,7 +796,7 @@ public final class TypeAdapters {
constantToName.put(constant, name);
}
} catch (NoSuchFieldException e) {
throw new AssertionError();
throw new AssertionError("Missing field in " + classOfT.getName(), e);
}
}
@Override public T read(JsonReader in) throws IOException {