Merge pull request #617 from hasuniea/master

Fixing null property in AndriodAPIUtils
This commit is contained in:
Harshan Liyanage 2017-03-16 13:01:07 +05:30 committed by GitHub
commit 58292f8c6f

View File

@ -490,7 +490,8 @@ public class AndroidAPIUtils {
if (exist) {
return ob.getValue().getAsString().replace("%", "");
}
if (ob.getValue().getAsString().equalsIgnoreCase(needed)) {
JsonElement val = ob.getValue();
if (val != null && !val.isJsonNull() && ob.getValue().getAsString().equalsIgnoreCase(needed)) {
exist = true;
}
}