Skip to content

Commit

Permalink
Rename ReflectiveTypeAdapterFactory field inclusion check method (#2121)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 authored Jul 21, 2022
1 parent 0106247 commit 503c20b
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ public ReflectiveTypeAdapterFactory(ConstructorConstructor constructorConstructo
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);
}

Expand Down Expand Up @@ -196,8 +192,8 @@ private Map<String, BoundField> getBoundFields(Gson context, TypeToken<?> type,
}

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;
}
Expand Down

0 comments on commit 503c20b

Please sign in to comment.