Hi all,
I would like to propose a small improvement in ToStringStyle.
Currently, some boolean fields in ToStringStyle are accessed directly in 
ToStringBuilder instead of through their getters. This prevents subclasses from 
overriding the behavior.
My proposal is to switch the code to use the getters instead of direct field 
access. This would allow subclasses to provide dynamic behavior, for example, 
returning values based on a logger’s debug level, without needing to create a 
new ToStringStyle instance for every toString() call.
Before opening a PR, I wanted to discuss this with the community to confirm 
that this approach is acceptable.
Any thoughts or concerns?
Note : this is already the case for the 'useIdentityHashCode' field.
Thanks,
William

Reply via email to