mirror of
https://github.com/google/nomulus.git
synced 2025-06-26 22:34:55 +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
|
@ -16,10 +16,8 @@ package google.registry.model;
|
|||
|
||||
import static com.google.common.base.Predicates.or;
|
||||
import static com.google.common.base.Predicates.subtypeOf;
|
||||
import static java.util.stream.Collectors.joining;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.common.collect.Ordering;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Queue;
|
||||
|
@ -60,14 +58,11 @@ public final class SchemaVersion {
|
|||
* types (for classes), or else a list of all possible values (for enums).
|
||||
*/
|
||||
public static String getSchema() {
|
||||
return FluentIterable.from(getAllPersistedTypes())
|
||||
return getAllPersistedTypes()
|
||||
.stream()
|
||||
.filter(or(subtypeOf(Enum.class), subtypeOf(ImmutableObject.class)))
|
||||
.transform(new Function<Class<?>, String>() {
|
||||
@Override
|
||||
public String apply(Class<?> clazz) {
|
||||
return ModelUtils.getSchema(clazz);
|
||||
}})
|
||||
.join(Joiner.on('\n'));
|
||||
.map(ModelUtils::getSchema)
|
||||
.collect(joining("\n"));
|
||||
}
|
||||
|
||||
private SchemaVersion() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue