Copilot commented on code in PR #2704:
URL: https://github.com/apache/groovy/pull/2704#discussion_r3574750290
##########
src/main/java/org/codehaus/groovy/classgen/AsmClassGenerator.java:
##########
@@ -281,7 +282,10 @@ public class AsmClassGenerator extends ClassGenerator {
private static final MethodCaller createPojoWrapperMethod =
MethodCaller.newStatic(ScriptBytecodeAdapter.class, "createPojoWrapper");
private static final MethodCaller createGroovyObjectWrapperMethod =
MethodCaller.newStatic(ScriptBytecodeAdapter.class,
"createGroovyObjectWrapper");
- private final Map<String,ClassNode> referencedClasses = new HashMap<>();
+ // insertion-ordered: iterated to generate the synthetic class-literal
fields and their
+ // accessors, so hash order would place them in an arbitrary order in the
class file
+ // rather than the order the class literals were encountered
+ private final Map<String,ClassNode> referencedClasses = new
LinkedHashMap<>();
Review Comment:
Match the existing generic type formatting in this file by adding a space
after the comma in `Map<String, ClassNode>` for consistency/readability.
--
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]