commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bharat (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LANG-1249) Exclude Fields on ReflectionToStringBuilder doesn't work for inner objects
Date Fri, 08 Jul 2016 00:31:10 GMT
bharat created LANG-1249:
----------------------------

             Summary: Exclude Fields on ReflectionToStringBuilder doesn't work for inner objects
                 Key: LANG-1249
                 URL: https://issues.apache.org/jira/browse/LANG-1249
             Project: Commons Lang
          Issue Type: Bug
            Reporter: bharat



Class Foo {
String a;
Bar bar;
}

Class Bar {
String b;
}

Foo f = new Foo();

 ReflectionToStringBuilder builder = new ReflectionToStringBuilder(f, new RecursiveToStringStyle());
 builder.setExcludeFieldNames("bar"); // this works

 builder.setExcludeFieldNames("b"); // this doesn't work (It doesn't exclude this field. It
only excludes top level fields of Class Foo (f in the example above)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message