mirror of
https://github.com/google/nomulus.git
synced 2025-05-21 19:59:34 +02:00
Replace deprecated "assignableFrom" with Guava 20 "subtypeOf"
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146161987
This commit is contained in:
parent
c50a76294f
commit
0a2622c6ab
1 changed files with 2 additions and 2 deletions
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
package google.registry.model;
|
package google.registry.model;
|
||||||
|
|
||||||
import static com.google.common.base.Predicates.assignableFrom;
|
|
||||||
import static com.google.common.base.Predicates.or;
|
import static com.google.common.base.Predicates.or;
|
||||||
|
import static com.google.common.base.Predicates.subtypeOf;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
|
@ -61,7 +61,7 @@ public final class SchemaVersion {
|
||||||
*/
|
*/
|
||||||
public static String getSchema() {
|
public static String getSchema() {
|
||||||
return FluentIterable.from(getAllPersistedTypes())
|
return FluentIterable.from(getAllPersistedTypes())
|
||||||
.filter(or(assignableFrom(Enum.class), assignableFrom(ImmutableObject.class)))
|
.filter(or(subtypeOf(Enum.class), subtypeOf(ImmutableObject.class)))
|
||||||
.transform(new Function<Class<?>, String>() {
|
.transform(new Function<Class<?>, String>() {
|
||||||
@Override
|
@Override
|
||||||
public String apply(Class<?> clazz) {
|
public String apply(Class<?> clazz) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue