mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 01:17:14 +02:00
Run automatic Java 8 conversion over codebase
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=171174380
This commit is contained in:
parent
44df5da771
commit
5edb7935ed
190 changed files with 2312 additions and 3096 deletions
|
@ -17,6 +17,7 @@ package google.registry.model.ofy;
|
|||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static com.google.common.base.Predicates.in;
|
||||
import static com.google.common.base.Predicates.not;
|
||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
import static com.google.common.collect.Maps.filterKeys;
|
||||
import static com.google.common.collect.Sets.difference;
|
||||
import static com.google.common.collect.Sets.union;
|
||||
|
@ -25,7 +26,6 @@ import static google.registry.model.ofy.ObjectifyService.ofy;
|
|||
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.googlecode.objectify.Key;
|
||||
|
@ -150,14 +150,13 @@ class CommitLoggedWork<R> extends VoidWork {
|
|||
ImmutableSet.copyOf(filterKeys(rootsForTouchedKeys, not(in(touchedKeys))).values());
|
||||
manifest = CommitLogManifest.create(info.bucketKey, info.transactionTime, info.getDeletes());
|
||||
final Key<CommitLogManifest> manifestKey = Key.create(manifest);
|
||||
mutations = FluentIterable
|
||||
.from(union(info.getSaves(), untouchedRootsWithTouchedChildren))
|
||||
.transform(new Function<Object, ImmutableObject>() {
|
||||
@Override
|
||||
public CommitLogMutation apply(Object saveEntity) {
|
||||
return CommitLogMutation.create(manifestKey, saveEntity);
|
||||
}})
|
||||
.toSet();
|
||||
mutations =
|
||||
union(info.getSaves(), untouchedRootsWithTouchedChildren)
|
||||
.stream()
|
||||
.map(
|
||||
(Function<Object, ImmutableObject>)
|
||||
(Object saveEntity) -> CommitLogMutation.create(manifestKey, saveEntity))
|
||||
.collect(toImmutableSet());
|
||||
ofy().saveWithoutBackup()
|
||||
.entities(new ImmutableSet.Builder<>()
|
||||
.add(manifest)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue