--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/ClassNode.java 2023-09-26 13:31:23.339542759 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/ClassNode.java 2023-09-26 19:47:32.055269643 +0200 @@ -406,7 +406,7 @@ } public Set getAllInterfaces () { - Set res = new HashSet(); + Set res = new LinkedHashSet(); getAllInterfaces(res); return res; } --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/VariableScope.java 2023-09-26 13:31:23.339542759 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/VariableScope.java 2023-09-26 20:06:22.392879780 +0200 @@ -16,8 +16,8 @@ package org.codehaus.groovy.ast; import java.util.Collections; -import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.Map; /** @@ -107,18 +107,15 @@ VariableScope copy = new VariableScope(); copy.clazzScope = clazzScope; if (declaredVariables.size() > 0) { - copy.declaredVariables = new HashMap(); - copy.declaredVariables.putAll(declaredVariables); + copy.declaredVariables = new LinkedHashMap(declaredVariables); } copy.inStaticContext = inStaticContext; copy.parent = parent; if (referencedClassVariables.size() > 0) { - copy.referencedClassVariables = new HashMap(); - copy.referencedClassVariables.putAll(referencedClassVariables); + copy.referencedClassVariables = new LinkedHashMap(referencedClassVariables); } if (referencedLocalVariables.size() > 0) { - copy.referencedLocalVariables = new HashMap(); - copy.referencedLocalVariables.putAll(referencedLocalVariables); + copy.referencedLocalVariables = new LinkedHashMap(referencedLocalVariables); } copy.resolvesDynamic = resolvesDynamic; return copy; @@ -126,7 +123,7 @@ public void putDeclaredVariable(Variable var) { if (declaredVariables == Collections.EMPTY_MAP) - declaredVariables = new HashMap(); + declaredVariables = new LinkedHashMap(); declaredVariables.put(var.getName(), var); } @@ -144,13 +141,13 @@ public void putReferencedLocalVariable(Variable var) { if (referencedLocalVariables == Collections.EMPTY_MAP) - referencedLocalVariables = new HashMap(); + referencedLocalVariables = new LinkedHashMap(); referencedLocalVariables.put(var.getName(), var); } public void putReferencedClassVariable(Variable var) { if (referencedClassVariables == Collections.EMPTY_MAP) - referencedClassVariables = new HashMap(); + referencedClassVariables = new LinkedHashMap(); referencedClassVariables.put(var.getName(), var); } --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/transform/ASTTransformationVisitor.java 2023-09-26 13:31:23.362876249 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/transform/ASTTransformationVisitor.java 2023-09-26 19:55:46.378599493 +0200 @@ -59,7 +59,7 @@ private Map> transforms; private Map, ASTTransformation> transformInstances; private static CompilationUnit compUnit; - private static Set globalTransformNames = new HashSet(); + private static Set globalTransformNames = new LinkedHashSet(); private ASTTransformationVisitor(CompilePhase phase) { this.phase = phase; --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/transform/CategoryASTTransformation.java 2023-09-26 13:31:23.362876249 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/transform/CategoryASTTransformation.java 2023-09-26 19:55:31.251830932 +0200 @@ -31,7 +31,7 @@ import groovy.lang.Reference; import java.util.Arrays; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -71,7 +71,7 @@ ClassNode targetClass = getTargetClass(source, annotation); final LinkedList> varStack = new LinkedList>(); - Set names = new HashSet(); + Set names = new LinkedHashSet(); for (FieldNode field : parent.getFields()) { names.add(field.getName()); } @@ -83,7 +83,7 @@ } private void addVariablesToStack(Parameter[] params) { - Set names = new HashSet(); + Set names = new LinkedHashSet(); names.addAll(varStack.getLast()); for (Parameter param : params) { names.add(param.getName()); @@ -107,7 +107,7 @@ @Override public void visitBlockStatement(BlockStatement block) { - Set names = new HashSet(); + Set names = new LinkedHashSet(); names.addAll(varStack.getLast()); varStack.add(names); super.visitBlockStatement(block); --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/transform/DelegateASTTransformation.java 2023-09-26 13:31:23.362876249 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/transform/DelegateASTTransformation.java 2023-09-26 19:51:23.170159705 +0200 @@ -34,7 +34,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -111,7 +111,7 @@ } private Set getInterfacesAndSuperInterfaces(ClassNode type) { - Set res = new HashSet(); + Set res = new LinkedHashSet(); if (type.isInterface()) { res.add(type); return res;