From 0634e25822eef6efbd968301132bd64b6405d135 Mon Sep 17 00:00:00 2001 From: mountford Date: Thu, 10 Nov 2016 11:27:50 -0800 Subject: [PATCH] Remove as-of date from argument list for extra create flow logic Lai points out that, for creation, the as-of date should always be equal to the creation time. And, in fact, there was a check to throw an exception if that is not the case. So it's more straightforward just to remove that argument entirely. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138783711 --- java/google/registry/flows/domain/DomainCreateFlow.java | 5 ++--- .../google/registry/flows/domain/RegistryExtraFlowLogic.java | 1 - .../google/registry/model/domain/TestExtraLogicManager.java | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/java/google/registry/flows/domain/DomainCreateFlow.java b/java/google/registry/flows/domain/DomainCreateFlow.java index 6c3a80f3d..7bab600f8 100644 --- a/java/google/registry/flows/domain/DomainCreateFlow.java +++ b/java/google/registry/flows/domain/DomainCreateFlow.java @@ -269,7 +269,7 @@ public class DomainCreateFlow implements TransactionalFlow { .setContacts(command.getContacts()) .addGracePeriod(GracePeriod.forBillingEvent(GracePeriodStatus.ADD, createBillingEvent)) .build(); - handleExtraFlowLogic(registry.getTldStr(), years, historyEntry, newDomain, now); + handleExtraFlowLogic(registry.getTldStr(), years, historyEntry, newDomain); entitiesToSave.add( newDomain, ForeignKeyIndex.create(newDomain, newDomain.getDeletionTime()), @@ -396,7 +396,7 @@ public class DomainCreateFlow implements TransactionalFlow { } private void handleExtraFlowLogic( - String tld, int years, HistoryEntry historyEntry, DomainResource newDomain, DateTime now) + String tld, int years, HistoryEntry historyEntry, DomainResource newDomain) throws EppException { Optional extraFlowLogic = RegistryExtraFlowLogicProxy.newInstanceForTld(tld); @@ -404,7 +404,6 @@ public class DomainCreateFlow implements TransactionalFlow { extraFlowLogic.get().performAdditionalDomainCreateLogic( newDomain, clientId, - now, years, eppInput, historyEntry); diff --git a/java/google/registry/flows/domain/RegistryExtraFlowLogic.java b/java/google/registry/flows/domain/RegistryExtraFlowLogic.java index 632d55da6..61da5af24 100644 --- a/java/google/registry/flows/domain/RegistryExtraFlowLogic.java +++ b/java/google/registry/flows/domain/RegistryExtraFlowLogic.java @@ -89,7 +89,6 @@ public interface RegistryExtraFlowLogic { public void performAdditionalDomainCreateLogic( DomainResource domain, String clientId, - DateTime asOfDate, int years, EppInput eppInput, HistoryEntry historyEntry) throws EppException; diff --git a/javatests/google/registry/model/domain/TestExtraLogicManager.java b/javatests/google/registry/model/domain/TestExtraLogicManager.java index 6adab8e2d..c9b3db50d 100644 --- a/javatests/google/registry/model/domain/TestExtraLogicManager.java +++ b/javatests/google/registry/model/domain/TestExtraLogicManager.java @@ -198,7 +198,6 @@ public class TestExtraLogicManager implements RegistryExtraFlowLogic { public void performAdditionalDomainCreateLogic( DomainResource domain, String clientId, - DateTime asOfDate, int years, EppInput eppInput, HistoryEntry historyEntry) throws EppException {