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,
|
public EMailAddress(String localpart, String subdomain, Domain domain,
|
||||||
String target) {
|
String target) {
|
||||||
this.localpart = localpart;
|
this.localpart = trimToEmpty(localpart);
|
||||||
this.subdomain = subdomain;
|
this.subdomain = trimToNull(subdomain);
|
||||||
this.domain = domain;
|
this.domain = domain;
|
||||||
this.target = target;
|
this.target = target;
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,9 @@ public class EMailAddressModuleImpl extends AbstractModuleImpl {
|
|||||||
if (adr.getLocalpart() == null) {
|
if (adr.getLocalpart() == null) {
|
||||||
adr.setLocalpart("");
|
adr.setLocalpart("");
|
||||||
}
|
}
|
||||||
|
if (adr.getSubdomain() == null) {
|
||||||
|
adr.setSubdomain("");
|
||||||
|
}
|
||||||
if (adr.getDomain() == null
|
if (adr.getDomain() == null
|
||||||
|| adr.getDomain().getName() == null
|
|| adr.getDomain().getName() == null
|
||||||
|| adr.getDomain().getName().length() == 0) {
|
|| adr.getDomain().getName().length() == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user