1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-26 09:38:52 -05:00

Fixed issue 497

This commit is contained in:
Bao-Long Nguyen-Trong 2009-06-25 17:05:50 +00:00
parent 3707e0e666
commit b572c8e065

View File

@ -28,6 +28,12 @@ public class Address {
public Address(String address, String personal) {
this.mAddress = address;
if ("".equals(personal)) {
personal = null;
}
if (personal!=null) {
personal = personal.trim();
}
this.mPersonal = personal;
}
@ -48,6 +54,12 @@ public class Address {
}
public void setPersonal(String personal) {
if ("".equals(personal)) {
personal = null;
}
if (personal!=null) {
personal = personal.trim();
}
this.mPersonal = personal;
}
@ -127,11 +139,11 @@ public class Address {
public String toString() {
if (mPersonal != null) {
// if (mPersonal.matches(".*[\\(\\)<>@,;:\\\\\".\\[\\]].*")) {
return "\"" + mPersonal+ "\" " + " <" + mAddress + ">";
// } else {
// return mPersonal + " <" + mAddress + ">";
// }
// if (mPersonal.matches(".*[\\(\\)<>@,;:\\\\\".\\[\\]].*")) {
return Utility.quoteString(mPersonal) + " <" + mAddress + ">";
// } else {
// return mPersonal + " <" + mAddress + ">";
// }
} else {
return mAddress;
}