mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +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
|
@ -29,7 +29,7 @@ import com.google.appengine.api.taskqueue.TransientFailureException;
|
|||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Streams;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.Objectify;
|
||||
import com.googlecode.objectify.ObjectifyFactory;
|
||||
|
@ -136,7 +136,7 @@ public class Ofy {
|
|||
@Override
|
||||
protected void handleDeletion(Iterable<Key<?>> keys) {
|
||||
assertInTransaction();
|
||||
checkState(Iterables.all(keys, notNull()), "Can't delete a null key.");
|
||||
checkState(Streams.stream(keys).allMatch(notNull()), "Can't delete a null key.");
|
||||
checkProhibitedAnnotations(keys, NotBackedUp.class, VirtualEntity.class);
|
||||
TRANSACTION_INFO.get().putDeletes(keys);
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ public class Ofy {
|
|||
@Override
|
||||
protected void handleSave(Iterable<?> entities) {
|
||||
assertInTransaction();
|
||||
checkState(Iterables.all(entities, notNull()), "Can't save a null entity.");
|
||||
checkState(Streams.stream(entities).allMatch(notNull()), "Can't save a null entity.");
|
||||
checkProhibitedAnnotations(entities, NotBackedUp.class, VirtualEntity.class);
|
||||
ImmutableMap<Key<?>, ?> keysToEntities = uniqueIndex(entities, OBJECTS_TO_KEYS);
|
||||
TRANSACTION_INFO.get().putSaves(keysToEntities);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue