mirror of
https://github.com/google/nomulus
synced 2026-01-08 15:21:46 +00:00
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:
@@ -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
|
||||
|
||||
@@ -574,7 +574,7 @@ public class Registry extends ImmutableObject implements Buildable {
|
||||
@Nullable
|
||||
public Interval getLrpPeriod() {
|
||||
return (lrpPeriodStart == null && lrpPeriodEnd == null)
|
||||
? null
|
||||
? new Interval(START_OF_TIME, Duration.ZERO)
|
||||
: new Interval(lrpPeriodStart, lrpPeriodEnd);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user