[ 
https://issues.apache.org/jira/browse/LANG-1710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory resolved LANG-1710.
-----------------------------------
    Fix Version/s: 3.14.0
       Resolution: Fixed

> 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
>             Fix For: 3.14.0
>
>
> 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)

Reply via email to