Replace Stream.concat with Streams.concat

Stream.concat only accepts 2 parameters. Streams.concat on the other hand
accepts any number of parameters.

Moving to Streams.concat for all uses (2 or more) makes sense for uniformity
and convenience reasons.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179716648
This commit is contained in:
guyben 2017-12-20 12:06:39 -08:00 committed by Ben McIlwain
parent eb07768200
commit 2c96633a20
9 changed files with 21 additions and 16 deletions

View file

@ -25,6 +25,7 @@ import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Streams;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.ObjectifyFactory;
@ -45,7 +46,6 @@ import google.registry.model.translators.InetAddressTranslatorFactory;
import google.registry.model.translators.ReadableInstantUtcTranslatorFactory;
import google.registry.model.translators.UpdateAutoTimestampTranslatorFactory;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Stream;
/**
* An instance of Ofy, obtained via {@code #ofy()}, should be used to access all persistable
@ -140,7 +140,7 @@ public class ObjectifyService {
// This is future-proofing for Objectify 5.x where the registration logic gets less lenient.
for (Class<?> clazz :
Stream.concat(
Streams.concat(
entityClasses.stream().filter(hasAnnotation(Entity.class)),
entityClasses.stream().filter(hasAnnotation(Entity.class).negate()))
.collect(toImmutableSet())) {