jdaugherty opened a new pull request, #2690:
URL: https://github.com/apache/groovy/pull/2690

   Code changes:
   
   - Added ReflectionUtils#getDeclaredMethodsSorted(Class), 
#getDeclaredFieldsSorted(Class), and #getDeclaredConstructorsSorted(Class): 
deterministic-order variants of the JDK reflection calls (methods sorted by 
name then signature, fields by name, constructors by signature), with javadoc 
documenting the nondeterminism and why callers whose output feeds bytecode 
generation must use them.
   - Java8#configureClassNode now uses the sorted variants for methods, fields, 
and constructors, so member order in reflection-backed ClassNodes — and 
everything derived from it — is deterministic.
   - Refactored the GROOVY-12146 fix in Java8#configureAnnotation to reuse 
getDeclaredMethodsSorted instead of its inline sort, centralizing the sorting 
so future callers don't repeat it ad hoc.
   
   Sorting is behavior-neutral: member order carries no semantic meaning in 
these paths; it only affects the byte layout of emitted class files.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to