You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "contextshuffling (Jira)" <ji...@apache.org> on 2020/01/19 15:52:00 UTC
[jira] [Updated] (LANG-1514) Test may fail due to a different
iteration order
[ https://issues.apache.org/jira/browse/LANG-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
contextshuffling updated LANG-1514:
-----------------------------------
Description:
Test `testGetAllFieldsList` in `FieldUtilsTest` checks if method `getAllFields` returns correct fields of a certain class. `getAllFields` depends on `java.lang.class.getDeclaredFields` to use reflection to get the fields. However, `java.lang.class.getDeclaredFields` does not guarantee any specific order of fields returned. Therefore, test will fail if the order returned by the API is different.
was:
Tests `testGetAllFieldsList` in `FieldUtilsTest` check if method `getAllFields` returns correct fields of a certain class. `getAllFields` depends on `java.lang.class.getDeclaredFields` to use reflection to get the fields. However, `java.lang.class.getDeclaredFields` does not guarantee any specific order of fields returned. Therefore, tests will fail if the order returned by the API is different.
> Test may fail due to a different iteration order
> ------------------------------------------------
>
> Key: LANG-1514
> URL: https://issues.apache.org/jira/browse/LANG-1514
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.reflect.*
> Reporter: contextshuffling
> Priority: Minor
>
> Test `testGetAllFieldsList` in `FieldUtilsTest` checks if method `getAllFields` returns correct fields of a certain class. `getAllFields` depends on `java.lang.class.getDeclaredFields` to use reflection to get the fields. However, `java.lang.class.getDeclaredFields` does not guarantee any specific order of fields returned. Therefore, test will fail if the order returned by the API is different.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)