-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude field condition #2066
Comments
You are right, that does not look correct. It seems the method name is incorrect (should probably be gson/gson/src/main/java/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java Lines 153 to 157 in 710a76c
Changing the implementation of the method causes a lot of test failures because it would erroneously exclude fields then. Note that I am not a member of this project. |
Agree with @Marcono1234, I think the two |
Maybe the |
https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/internal/bind/ReflectiveTypeAdapterFactory.java#L68
Is it ok? If follow that logic, the field going to be excluded when
A. NOT exclude a class
AND
B. NOT exclude a field
I guess it should be
return excluder.excludeClass(f.getType(), serialize) || excluder.excludeField(f, serialize)
that means, that, the field going to be excluded when
A. exclude a class
OR
B. exclude a field
Correct me if I wrong
The text was updated successfully, but these errors were encountered: