[
https://issues.apache.org/jira/browse/LANG-1710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17759333#comment-17759333
]
Oksana commented on LANG-1710:
------------------------------
It is great that PR already created, but when it will be merged? And what the
release date? Also, [~ggregory] what do you think about using
_trySetAccessible_ instead of
_AccessibleObject.setAccessible(fields, true);_ and skipping not accessible
fields?
> ReflectionToStringBuilder changes in version 3.13.0 has broken the logic for
> overriding classes
> -----------------------------------------------------------------------------------------------
>
> Key: LANG-1710
> URL: https://issues.apache.org/jira/browse/LANG-1710
> Project: Commons Lang
> Issue Type: Bug
> Reporter: Oksana
> Priority: Major
>
> It is said that overriding classes should overload two methods:
> _#getValue(java.lang.reflect.Field)}_ and
> {_}#accept(java.lang.reflect.Field)}{_}.
> But since 3.13.0 getValue(java.lang.reflect.Field)} no longer called in
> {_}appendFieldsIn{_}.
> * System.out.println("An object: " +
> ReflectionToStringBuilder.toString(anObject));
> *
> * A subclass can control field output by overriding the methods:
> *
> * <li>\{@link #accept(java.lang.reflect.Field)}</li>
> * <li>\{@link #getValue(java.lang.reflect.Field)}</li>
> Also consider to use _trySetAccessible_ instead of
> _AccessibleObject.setAccessible(fields, true);_ and skip not accessible
> fields.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)