mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Statically import commonly used TldState enum values
Takes advantage of the fact that the default state of a TLD created in tests is GENERAL_AVAILABILITY. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228916164
This commit is contained in:
parent
eeb65b4610
commit
170980db2f
14 changed files with 62 additions and 63 deletions
|
@ -27,6 +27,7 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
|||
import static google.registry.model.registry.Registries.findTldForName;
|
||||
import static google.registry.model.registry.Registries.getTlds;
|
||||
import static google.registry.model.registry.Registry.TldState.GENERAL_AVAILABILITY;
|
||||
import static google.registry.model.registry.Registry.TldState.PREDELEGATION;
|
||||
import static google.registry.model.registry.Registry.TldState.START_DATE_SUNRISE;
|
||||
import static google.registry.model.registry.label.ReservationType.FULLY_BLOCKED;
|
||||
import static google.registry.model.registry.label.ReservationType.NAMESERVER_RESTRICTED;
|
||||
|
@ -890,7 +891,7 @@ public class DomainFlowUtils {
|
|||
/** Check that the registry phase is not predelegation, during which some flows are forbidden. */
|
||||
public static void verifyNotInPredelegation(Registry registry, DateTime now)
|
||||
throws BadCommandForRegistryPhaseException {
|
||||
if (registry.getTldState(now) == TldState.PREDELEGATION) {
|
||||
if (registry.getTldState(now) == PREDELEGATION) {
|
||||
throw new BadCommandForRegistryPhaseException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue