[ https://issues.apache.org/jira/browse/LANG-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863719#action_12863719 ]
Philip Hodges commented on LANG-621: ------------------------------------ suggested resolution: explain in documentation that the default is shallow and show how to do deep logging with a custom deep style. provide in code: a deep style that does expand field objects (other than auto-boxed primitives). add test case for the deep style > ReflectionToStringBuilder.toString does not debug 3rd party object fields > within 3rd party object > ------------------------------------------------------------------------------------------------- > > Key: LANG-621 > URL: https://issues.apache.org/jira/browse/LANG-621 > Project: Commons Lang > Issue Type: Bug > Components: lang.builder.* > Affects Versions: 2.5 > Reporter: Philip Hodges > > import org.apache.commons.lang.builder.ReflectionToStringBuilder; > public class Reflect { > public static void main(String[] args) { > // "You can also use the builder to debug 3rd party objects:" > // System.out.println("An object: " + > ReflectionToStringBuilder.toString(anObject)); > // expected: > reflect$compoundreflectionfieldsfixt...@a83b8a[instanceint=67890,fixture=reflect$simplereflectionfieldsfixt...@1d1acd3[instanceint=67890]] > // actual: > reflect$compoundreflectionfieldsfixt...@a83b8a[instanceint=67890,fixture=reflect$simplereflectionfieldsfixt...@1d1acd3] > System.out.println(ReflectionToStringBuilder.toString(new > CompoundReflectionFieldsFixture())); > } > static class CompoundReflectionFieldsFixture { > private int instanceInt = 67890; > private SimpleReflectionFieldsFixture fixture = new > SimpleReflectionFieldsFixture(); > } > static class SimpleReflectionFieldsFixture { > private int instanceInt = 67890; > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.