[ 
https://issues.apache.org/jira/browse/LANG-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18117994#comment-18117994
 ] 

Gilles Sadowski commented on LANG-1249:
---------------------------------------

According to the description, it's either a bug or a missing feature.
It doesn't hurt to keep this ticket open...

> 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
>            Priority: Major
>
> 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
(v8.20.10#820010)

Reply via email to