addressInfo in bttps file 增加容错

master
yixian 4 years ago
parent 1609284d26
commit 1767cb98e9

@ -13,6 +13,7 @@ public class AddressInfo {
public AddressInfo(String address, String suburb, String state, String postCode, String country) {
this.address = address;
this.suburb = suburb;
postCode = postCode.replaceAll("\\D", "");
if (!postCode.matches("^\\d{4}$")) {
postCode = "9999";
country = "OTH";
@ -24,7 +25,9 @@ public class AddressInfo {
postCode = "9999";
}
this.postCode = postCode;
this.state = state;
if (state != null) {
this.state = state.toUpperCase();
}
this.country = country;
}

Loading…
Cancel
Save