fix error in handling of empty subdomain-property
This commit is contained in:
parent
5056e46610
commit
6b27737db6
@ -66,8 +66,8 @@ public class EMailAddress extends AbstractEntity implements Serializable {
|
||||
|
||||
public EMailAddress(String localpart, String subdomain, Domain domain,
|
||||
String target) {
|
||||
this.localpart = localpart;
|
||||
this.subdomain = subdomain;
|
||||
this.localpart = trimToEmpty(localpart);
|
||||
this.subdomain = trimToNull(subdomain);
|
||||
this.domain = domain;
|
||||
this.target = target;
|
||||
}
|
||||
|
@ -35,6 +35,9 @@ public class EMailAddressModuleImpl extends AbstractModuleImpl {
|
||||
if (adr.getLocalpart() == null) {
|
||||
adr.setLocalpart("");
|
||||
}
|
||||
if (adr.getSubdomain() == null) {
|
||||
adr.setSubdomain("");
|
||||
}
|
||||
if (adr.getDomain() == null
|
||||
|| adr.getDomain().getName() == null
|
||||
|| adr.getDomain().getName().length() == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user