Rename ReflectiveTypeAdapterFactory field inclusion check method (#2121)

This commit is contained in:
Marcono1234 2022-07-21 20:53:52 +02:00 committed by GitHub
parent 010624730b
commit 503c20bb39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,11 +68,7 @@ public final class ReflectiveTypeAdapterFactory implements TypeAdapterFactory {
this.reflectionFilters = reflectionFilters;
}
public boolean excludeField(Field f, boolean serialize) {
return excludeField(f, serialize, excluder);
}
static boolean excludeField(Field f, boolean serialize, Excluder excluder) {
private boolean includeField(Field f, boolean serialize) {
return !excluder.excludeClass(f.getType(), serialize) && !excluder.excludeField(f, serialize);
}
@ -196,8 +192,8 @@ public final class ReflectiveTypeAdapterFactory implements TypeAdapterFactory {
}
for (Field field : fields) {
boolean serialize = excludeField(field, true);
boolean deserialize = excludeField(field, false);
boolean serialize = includeField(field, true);
boolean deserialize = includeField(field, false);
if (!serialize && !deserialize) {
continue;
}