mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Add @Deprecated to DomainApplication.cloneProjectedAtTime()
DomainApplications have nothing to project, so it's a mistake to call their cloneProjectedAtTime() method. Marking it @Deprecated helps prevent such inadvertent use. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146716189
This commit is contained in:
parent
bf068e61d9
commit
7986be139d
2 changed files with 4 additions and 4 deletions
|
@ -19,7 +19,6 @@ import static com.google.common.base.Strings.isNullOrEmpty;
|
|||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.model.ofy.Ofy.RECOMMENDED_MEMCACHE_EXPIRATION;
|
||||
import static google.registry.util.CollectionUtils.isNullOrEmpty;
|
||||
import static google.registry.util.DateTimeUtils.latestOf;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
|
@ -95,9 +94,8 @@ public class DomainApplicationIndex extends BackupGroupRoot {
|
|||
}
|
||||
ImmutableSet.Builder<DomainApplication> apps = new ImmutableSet.Builder<>();
|
||||
for (DomainApplication app : ofy().load().keys(index.getKeys()).values()) {
|
||||
DateTime forwardedNow = latestOf(now, app.getUpdateAutoTimestamp().getTimestamp());
|
||||
if (app.getDeletionTime().isAfter(forwardedNow)) {
|
||||
apps.add(app.cloneProjectedAtTime(forwardedNow));
|
||||
if (app.getDeletionTime().isAfter(now)) {
|
||||
apps.add(app);
|
||||
}
|
||||
}
|
||||
return apps.build();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue