Menu

#4 Under Java7, property order is indeterminant

v1.0_(example)
open
nobody
java7 (1)
1
2013-10-06
2013-10-06
No

As of Java7, the order of fields and methods returned by reflection, which was never guaranteed to be in any particular order, is now indeed not (in general) in source-code order. This breaks two tests in PojomatorImplTest (testShortCircuitEquals and testToStringNames), and can cause similar issues in real-world code.

Propsed fix - use ASM to parse the classfile to get the order from there.

Discussion

Anonymous
Anonymous

Add attachments
Cancel