Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.8.1
-
None
-
None
Description
I tried to implement a custom ToStringStyle and I wanted to get the short class name in the printed text. My first thought was to override the method isUseShortClassName in the subclass to make it returns always true, but unexpectedly this didn't work, as the protected method appendClassName(final StringBuffer buffer, final Object object) doesn't use the boolean getter and directly access the private boolean useShortClassName member.
I think the appendClassName method should act the same way, for example, the method appendIdentityHashCode does, i.e. accessing the private boolean useIdentityHashCode by its getter.
Thank you.