Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Tests in MultilineRecursiveToStringStyleTest.java, RecursiveToStringStyleTest.java, ToStringBuilderTest.java depends on ReflectionToStringBuilder.appendFieldsIn. It appends the fields returned by java.lang.Class.getDeclaredFields.
However, java.lang.Class.getDeclaredFields does not guarantee any specific order and thus, test can fail if the order is different, (i.e., it generates a different hash code). "The elements in the returned array are not sorted and are not in any particular order" (reference: https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclaredMethods--)
Attachments
Attachments
Issue Links
- links to