Not honoring @Nullable on null JSON fields
luciofm opened this issue · 1 comments
luciofm commented
Since https://github.com/rharter/auto-value-moshi/pull/76/files#diff-e17f3c4ec8512f83b9f9ec35523a3803L413 is not honoring @nullable properties when the actual JSON field is null
, if the field is just missing, everything works fine.
Take this example:
@AutoValue
public abstract class WithNullableClass {
public abstract String value();
@Nullable public abstract NullableClass nullableClass();
@AutoValue
public static abstract class NullableClass {
@Nullable public abstract String string();
}
}
This will fail with {"value":"value","nullableClass":null}
but not with {"value":"value"}