GsonSubType doesn't handle null subtype fields
Closed this issue · 1 comments
LachlanMcKee commented
At the moment the GsonSubType field does not correctly check if the subtype field is null before attempting to access the value. This causes the following exception to fire:
java.lang.UnsupportedOperationException: JsonNull
at com.google.gson.JsonElement.getAsString(JsonElement.java:191)
A safeguard should be added to check if the object within the subtype field is JsonNull
. if it is, it should be treated the same way as if the field didn't exist at all.
LachlanMcKee commented
This bug has been resolved and merged to develop