public void addRestrictedDomain(String domainName){
  if (StringUtils.isEmpty(domainName)) {
    return;
  }
  if (restrictedDomains == null) {
    restrictedDomains=new ArrayList<>();
  }
  restrictedDomains.add(domainName);
}

public void addRestrictedDomain ( String domainName ) { if ( StringUtils . isEmpty ( domainName ) ) { return ; } if ( restrictedDomains == null ) { restrictedDomains = new ArrayList < > ( ) ; } restrictedDomains . add ( domainName ) ; }
adds specified domain name to the list of restricted domains
