Get rid of cloneWithLinkedStatus

Now that we return an Info object rather than the resource itself,
there's no reason for the cloning pattern.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145426484
This commit is contained in:
cgoldfeder 2017-01-24 09:16:22 -08:00 committed by Ben McIlwain
parent 2bb61b82f4
commit d5160213e5
3 changed files with 24 additions and 17 deletions

View file

@ -360,17 +360,6 @@ public final class EppResourceUtils {
return queryForLinkedDomains(key, now).limit(1).count() > 0;
}
/** Clone a contact or host with an eventually-consistent notion of LINKED. */
public static EppResource cloneResourceWithLinkedStatus(EppResource resource, DateTime now) {
Builder<?, ?> builder = resource.asBuilder();
if (isLinked(Key.create(resource), now)) {
builder.addStatusValue(StatusValue.LINKED);
} else {
builder.removeStatusValue(StatusValue.LINKED);
}
return builder.build();
}
/** Exception to throw when failing to parse a repo id. */
public static class InvalidRepoIdException extends Exception {