Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1514

Test may fail due to a different iteration order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9
    • 3.11
    • lang.reflect.*
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              kinow Bruno P. Kinoshita
              contextshuffling contextshuffling
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m