Run automatic Java 8 conversion over codebase

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=171174380
This commit is contained in:
mcilwain 2017-10-05 10:48:38 -07:00 committed by Ben McIlwain
parent 44df5da771
commit 5edb7935ed
190 changed files with 2312 additions and 3096 deletions

View file

@ -20,8 +20,6 @@ import static com.google.common.truth.Truth.assert_;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.base.Function;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import com.googlecode.objectify.annotation.Id;
@ -157,14 +155,11 @@ public class EntityTestCase {
}
// Descend into persisted ImmutableObject classes, but not anything else.
if (ImmutableObject.class.isAssignableFrom(fieldClass)) {
fields.addAll(FluentIterable
.from(getAllPotentiallyIndexedFieldPaths(fieldClass))
.transform(new Function<String, String>(){
@Override
public String apply(String subfield) {
return field.getName() + "." + subfield;
}})
.toSet());
getAllPotentiallyIndexedFieldPaths(fieldClass)
.stream()
.map(subfield -> field.getName() + "." + subfield)
.distinct()
.forEachOrdered(fields::add);
} else {
fields.add(field.getName());
}