Hello William,

Thank you for reaching out.

Feel free to provide a PR on GitHub with unit tests so we can see what
impact this may have regarding possibly breaking existing call sites.

Thank you,
Gary


On Mon, Sep 29, 2025, 10:38 William Degrange <[email protected]>
wrote:

> 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