From ddffbb0b61e16db4e5f93de3f875a880b50e5b1a Mon Sep 17 00:00:00 2001 From: cgoldfeder Date: Tue, 31 Jan 2017 11:50:39 -0800 Subject: [PATCH] Remove unnecessary filter on LINKED We already have an @OnLoad in EppResource that removes LINKED from any status values, so there's no reason to filter in info. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146146501 --- java/google/registry/flows/contact/ContactInfoFlow.java | 4 +--- java/google/registry/flows/host/HostInfoFlow.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/java/google/registry/flows/contact/ContactInfoFlow.java b/java/google/registry/flows/contact/ContactInfoFlow.java index 4ab22b33f..7328f55fd 100644 --- a/java/google/registry/flows/contact/ContactInfoFlow.java +++ b/java/google/registry/flows/contact/ContactInfoFlow.java @@ -18,7 +18,6 @@ import static google.registry.flows.FlowUtils.validateClientIsLoggedIn; import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence; import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo; import static google.registry.model.EppResourceUtils.isLinked; -import static google.registry.util.CollectionUtils.difference; import com.google.common.base.Optional; import com.google.common.collect.ImmutableSet; @@ -67,8 +66,7 @@ public final class ContactInfoFlow implements Flow { boolean includeAuthInfo = clientId.equals(contact.getCurrentSponsorClientId()) || authInfo.isPresent(); ImmutableSet.Builder statusValues = new ImmutableSet.Builder<>(); - // TODO(b/34664935): When LINKED is no longer persisted we won't need to filter it out. - statusValues.addAll(difference(contact.getStatusValues(), StatusValue.LINKED)); + statusValues.addAll(contact.getStatusValues()); if (isLinked(Key.create(contact), now)) { statusValues.add(StatusValue.LINKED); } diff --git a/java/google/registry/flows/host/HostInfoFlow.java b/java/google/registry/flows/host/HostInfoFlow.java index d193140ce..b0aafaefa 100644 --- a/java/google/registry/flows/host/HostInfoFlow.java +++ b/java/google/registry/flows/host/HostInfoFlow.java @@ -18,7 +18,6 @@ import static google.registry.flows.FlowUtils.validateClientIsLoggedIn; import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence; import static google.registry.flows.host.HostFlowUtils.validateHostName; import static google.registry.model.EppResourceUtils.isLinked; -import static google.registry.util.CollectionUtils.difference; import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; @@ -63,8 +62,7 @@ public final class HostInfoFlow implements Flow { DateTime now = clock.nowUtc(); HostResource host = loadAndVerifyExistence(HostResource.class, targetId, now); ImmutableSet.Builder statusValues = new ImmutableSet.Builder<>(); - // TODO(b/34664935): When LINKED is no longer persisted we won't need to filter it out. - statusValues.addAll(difference(host.getStatusValues(), StatusValue.LINKED)); + statusValues.addAll(host.getStatusValues()); if (isLinked(Key.create(host), now)) { statusValues.add(StatusValue.LINKED); }