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

Gary D. Gregory resolved LANG-1612.
-----------------------------------
    Fix Version/s: 3.12
       Resolution: Fixed

Hi [~xint5]

Fixed in git master.

You might want to review the tests that process List of Field objects for 
similar issues. See the sorting solution in git master. I believe it is clearer 
and simpler.

 

> testGetAllFields and testGetFieldsWithAnnotation sometimes fail
> ---------------------------------------------------------------
>
>                 Key: LANG-1612
>                 URL: https://issues.apache.org/jira/browse/LANG-1612
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.reflect.*
>    Affects Versions: 3.11
>            Reporter: XinT
>            Priority: Minor
>              Labels: pull-request-available, test
>             Fix For: 3.12
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The testGetAllFields() and testGetFieldsWithAnnotation() functions in 
> FieldUtilsTest are flaky because they contain assertArraysEquals() on two 
> arrays that may not be exactly equal. The arrays are guaranteed to contain 
> the exact same elements, but the elements may be ordered differently, causing 
> the assertion to sometimes fail.
> More specifically, FieldUtils.getAllFields() does not necessarily return an 
> array in the order that the current tests assume.
> Github PR: https://github.com/apache/commons-lang/pull/640 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to