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

@ -29,6 +29,7 @@ import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.ImmutableTable;
import com.google.common.collect.Maps;
import com.google.common.collect.Ordering;
import com.google.common.collect.Streams;
import google.registry.model.ImmutableObject;
import google.registry.request.JsonResponse;
import google.registry.request.Parameter;
@ -150,7 +151,7 @@ public abstract class ListObjectsAction<T extends ImmutableObject> implements Ru
final ImmutableMap<String, String> nameMapping =
((fullFieldNames != null) && fullFieldNames.isPresent() && fullFieldNames.get())
? getFieldAliases() : getFieldAliases().inverse();
return Stream.concat(getPrimaryKeyFields().stream(), fieldsToUse.stream())
return Streams.concat(getPrimaryKeyFields().stream(), fieldsToUse.stream())
.map(field -> nameMapping.getOrDefault(field, field))
.collect(toImmutableSet());
}
@ -207,7 +208,7 @@ public abstract class ListObjectsAction<T extends ImmutableObject> implements Ru
Maps.transformEntries(
data.columnMap(),
(columnName, columnValues) ->
Stream.concat(
Streams.concat(
Stream.of(includingHeader ? columnName : ""),
columnValues.values().stream())
.map(String::length)