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.
Anonymous