From d73ef66352b70a084ad15ce7645351180352959b Mon Sep 17 00:00:00 2001 From: mcilwain Date: Thu, 14 Sep 2017 07:50:54 -0700 Subject: [PATCH] Remove temporary handling of invalid billing events The bad prober domain data has since been deleted, so we no longer need to handle the case where these Keys point to entities that don't exist. This mostly reverses [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=168687701 --- .../registry/flows/domain/DomainFlowUtils.java | 15 +-------------- .../flows/domain/DomainDeleteFlowTest.java | 14 -------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/java/google/registry/flows/domain/DomainFlowUtils.java b/java/google/registry/flows/domain/DomainFlowUtils.java index 31581ef96..955d4618c 100644 --- a/java/google/registry/flows/domain/DomainFlowUtils.java +++ b/java/google/registry/flows/domain/DomainFlowUtils.java @@ -37,7 +37,6 @@ import static google.registry.util.DateTimeUtils.END_OF_TIME; import static google.registry.util.DateTimeUtils.isAtOrAfter; import static google.registry.util.DateTimeUtils.leapSafeAddYears; import static google.registry.util.DomainNameUtils.ACE_PREFIX; -import static google.registry.util.FormattingLogger.getLoggerForCallerClass; import com.google.common.base.CharMatcher; import com.google.common.base.Joiner; @@ -111,7 +110,6 @@ import google.registry.model.reporting.DomainTransactionRecord; import google.registry.model.reporting.DomainTransactionRecord.TransactionReportField; import google.registry.model.reporting.HistoryEntry; import google.registry.model.tmch.ClaimsListShard; -import google.registry.util.FormattingLogger; import google.registry.util.Idn; import java.math.BigDecimal; import java.util.HashSet; @@ -127,8 +125,6 @@ import org.joda.time.Duration; /** Static utility functions for domain flows. */ public class DomainFlowUtils { - private static final FormattingLogger logger = getLoggerForCallerClass(); - /** Map from launch phases to the equivalent tld states. */ private static final ImmutableMap LAUNCH_PHASE_TO_TLD_STATE = ImmutableMap.of( @@ -521,16 +517,7 @@ public class DomainFlowUtils { } Recurring recurring = ofy().load().key(domain.getAutorenewBillingEvent()).now(); - // TODO(b/27472322): Revert handling of recurring being null once bad data is cleaned from prod. - // It shouldn't ever actually be null, and we only have some null data left because of issues - // dating back to the Registry 2.0 migration. - if (recurring == null) { - logger.warningfmt( - "Domain name %s has null autorenew billing event; ignoring. Domain key: %s.", - domain.getFullyQualifiedDomainName(), Key.create(domain)); - } else { - ofy().save().entity(recurring.asBuilder().setRecurrenceEndTime(newEndTime).build()); - } + ofy().save().entity(recurring.asBuilder().setRecurrenceEndTime(newEndTime).build()); } /** diff --git a/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java b/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java index 53a9c320b..49207942d 100644 --- a/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java @@ -511,20 +511,6 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase