Automated g4 rollback of changelist 240574585.

*** Reason for rollback ***

The inconsistent class loading is breaking the tests

*** Original change description ***

Validate provided email addresses when creating a Registrar

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=241014945
This commit is contained in:
gbrodman
2019-03-29 16:23:59 -04:00
committed by jianglai
parent 315be3eab0
commit 25f1d58969
10 changed files with 24 additions and 137 deletions
@@ -18,7 +18,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static com.google.common.collect.Sets.difference;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.model.registrar.Registrar.checkValidEmail;
import static google.registry.util.CollectionUtils.nullToEmptyImmutableSortedCopy;
import static java.util.stream.Collectors.joining;
@@ -297,7 +296,7 @@ public class RegistrarContact extends ImmutableObject implements Jsonifiable {
@Override
public RegistrarContact build() {
checkNotNull(getInstance().parent, "Registrar parent cannot be null");
checkValidEmail(getInstance().emailAddress);
checkNotNull(getInstance().emailAddress, "Email address cannot be null");
return cloneEmptyToNull(super.build());
}