Small address JSON fixes

This commit is contained in:
M66B
2020-05-07 11:17:23 +02:00
parent cac5bae40b
commit cd6986ac7e
2 changed files with 18 additions and 13 deletions

View File

@@ -106,7 +106,7 @@ public class InternetAddressJson extends InternetAddress {
if (this.json != null) {
try {
JSONObject jaddress = new JSONObject("{" + this.json + "}");
String address = jaddress.getString("address");
String address = jaddress.optString("address");
String personal = jaddress.optString("personal");
if (!TextUtils.isEmpty(address))
super.setAddress(address);