Prevent NPE in PhoneNumberFormatter.

This commit is contained in:
Alex Hart
2021-01-22 15:30:05 -04:00
committed by Greyson Parrelli
parent 9d5a52a980
commit e55834d523

View File

@@ -147,7 +147,7 @@ public class PhoneNumberFormatter {
return "+" +
countryCode.replaceAll("[^0-9]", "").replaceAll("^0*", "") +
number.replaceAll("[^0-9]", "");
(number != null ? number.replaceAll("[^0-9]", "") : "");
}
public static String getInternationalFormatFromE164(String e164number) {