You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by kinow <gi...@git.apache.org> on 2017/05/01 10:12:03 UTC
[GitHub] commons-lang pull request #209: LANG-1164: allow ToStringStyle to omitNulls
Github user kinow commented on a diff in the pull request:
https://github.com/apache/commons-lang/pull/209#discussion_r114114198
--- Diff: src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java ---
@@ -467,6 +472,7 @@ protected void removeLastFieldSeparator(final StringBuffer buffer) {
* for summary info, <code>null</code> for style decides
*/
public void append(final StringBuffer buffer, final String fieldName, final Object value, final Boolean fullDetail) {
+ if (omitNulls && value == null) return;
--- End diff --
With our current checkstyle checks, this will create an error (error in Checkstyle, not a build error).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---