mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 17:18:50 -05:00
. Added defensive code against empty self BCC address
This fixed issues 639 & 646
This commit is contained in:
parent
f3312eb064
commit
c2ca739293
@ -516,7 +516,11 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
||||
}
|
||||
|
||||
if (!ACTION_EDIT_DRAFT.equals(action)) {
|
||||
addAddress(mBccView, new Address(mAccount.getAlwaysBcc(), ""));
|
||||
String bccAddress = mAccount.getAlwaysBcc();
|
||||
if (bccAddress!=null
|
||||
&& !"".equals(bccAddress)) {
|
||||
addAddress(mBccView, new Address(mAccount.getAlwaysBcc(), ""));
|
||||
}
|
||||
}
|
||||
|
||||
Log.d(Email.LOG_TAG, "action = " + action + ", mAccount = " + mAccount + ", mFolder = " + mFolder + ", mSourceMessageUid = " + mSourceMessageUid);
|
||||
|
@ -70,10 +70,15 @@ public class Address {
|
||||
*/
|
||||
public static Address[] parseUnencoded(String addressList) {
|
||||
List<Address> addresses = new ArrayList<Address>();
|
||||
if (addressList!=null) {
|
||||
if (addressList!=null
|
||||
&& !"".equals(addressList)) {
|
||||
Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(addressList);
|
||||
for (Rfc822Token token : tokens) {
|
||||
addresses.add(new Address(token.getAddress(), token.getName()));
|
||||
String address = token.getAddress();
|
||||
if (address!=null
|
||||
&& !"".equals(address)) {
|
||||
addresses.add(new Address(token.getAddress(), token.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return addresses.toArray(new Address[0]);
|
||||
@ -88,7 +93,8 @@ public class Address {
|
||||
*/
|
||||
public static Address[] parse(String addressList) {
|
||||
ArrayList<Address> addresses = new ArrayList<Address>();
|
||||
if (addressList == null) {
|
||||
if (addressList == null
|
||||
&& !"".equals(addressList)) {
|
||||
return new Address[] {};
|
||||
}
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user