Skip to content
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

LANG-1167: Add null filter to ReflectionToStringBuilder #259

Merged
merged 5 commits into from Apr 20, 2017

Conversation

MarkDacek
Copy link
Contributor

@chtompki
First attempt at this. In order to avoid a large refactor or breaking existing implementations, the boolean has to be a negative (isExcludeNullValues instead of appendNullValues).

@coveralls
Copy link

coveralls commented Mar 18, 2017

Coverage Status

Coverage increased (+0.01%) to 94.559% when pulling e423b0b on MarkDacek:LANG-1167 into bf80b9e on apache:master.

@chtompki
Copy link
Member

@PascalSchumacher - Do you think we should take this approach, or the approach you went after in LANG-1164.

@PascalSchumacher
Copy link
Contributor

@chtompki Sorry for the delay, other open source projects and vacations interfered.

As the ToStringStyle implementations are singletons, I do not see a save way to use #209 as a basis for this pull request. Maybe I'm missing something?

I think #209 and this can coexists (as long as the naming is aligned).

@MarkDacek Thanks for creating this pull request. I think it would be great to have this feature in commons-lang. 👍

@asfgit asfgit merged commit e423b0b into apache:master Apr 20, 2017
@HiAscend
Copy link

HiAscend commented Jul 4, 2019

hello ,
on V3.8 V3.8.1 V3.9
when i use
ReflectionToStringBuilder.toString(student, ToStringStyle.JSON_STYLE)
return some like
{"id":666,"age":22,"name":"\u4E2D\u56FD","birthday":"Thu Jul 04 13:29:26 CST 2019","book":{"name":null}}
the student name is "中国" but now it is in unicode charset

however
on V3.7 it is ok
see:https://bbs.csdn.net/topics/392557654?page=1#post-404105720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants