Use an empty interval instead of null to signal no LRP

This removes the need for some null checks

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136146549
This commit is contained in:
cgoldfeder 2016-10-14 05:05:06 -07:00 committed by Ben McIlwain
parent 148270a813
commit 064026a4a5
3 changed files with 5 additions and 4 deletions

View file

@ -201,8 +201,7 @@ public abstract class BaseDomainCreateFlow<R extends DomainBase, B extends Build
isAnchorTenantViaReservation = matchesAnchorTenantReservation(
domainLabel, tld, command.getAuthInfo().getPw().getValue());
boolean isLrpApplication =
registry.getLrpPeriod() != null
&& registry.getLrpPeriod().contains(now)
registry.getLrpPeriod().contains(now)
&& !command.getAuthInfo().getPw().getValue().isEmpty()
&& !isAnchorTenantViaReservation;
lrpToken = isLrpApplication