mirror of
https://github.com/google/nomulus
synced 2026-08-20 14:16:19 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user