2023-09-26 19:58:43 +02:00
|
|
|
--- 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 @@
|
2023-09-26 16:01:27 +02:00
|
|
|
}
|
|
|
|
|
2023-09-26 19:58:43 +02:00
|
|
|
public Set<ClassNode> getAllInterfaces () {
|
|
|
|
- Set<ClassNode> res = new HashSet<ClassNode>();
|
|
|
|
+ Set<ClassNode> res = new LinkedHashSet<ClassNode>();
|
|
|
|
getAllInterfaces(res);
|
|
|
|
return res;
|
2023-09-26 16:01:27 +02:00
|
|
|
}
|
2023-09-26 19:58:43 +02:00
|
|
|
--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/VariableScope.java 2023-09-26 13:31:23.339542759 +0200
|
2023-09-26 20:11:32 +02:00
|
|
|
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/VariableScope.java 2023-09-26 20:06:22.392879780 +0200
|
2023-09-26 19:58:43 +02:00
|
|
|
@@ -16,8 +16,8 @@
|
|
|
|
package org.codehaus.groovy.ast;
|
2023-09-26 16:01:27 +02:00
|
|
|
|
2023-09-26 19:58:43 +02:00
|
|
|
import java.util.Collections;
|
|
|
|
-import java.util.HashMap;
|
2023-09-26 11:06:52 +02:00
|
|
|
import java.util.Iterator;
|
2023-09-26 19:58:43 +02:00
|
|
|
+import java.util.LinkedHashMap;
|
2023-09-26 11:06:52 +02:00
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
2023-09-26 20:11:32 +02:00
|
|
|
@@ -107,18 +107,15 @@
|
2023-09-26 19:58:43 +02:00
|
|
|
VariableScope copy = new VariableScope();
|
|
|
|
copy.clazzScope = clazzScope;
|
|
|
|
if (declaredVariables.size() > 0) {
|
|
|
|
- copy.declaredVariables = new HashMap<String, Variable>();
|
2023-09-26 20:11:32 +02:00
|
|
|
- copy.declaredVariables.putAll(declaredVariables);
|
|
|
|
+ copy.declaredVariables = new LinkedHashMap<String, Variable>(declaredVariables);
|
2023-09-26 19:58:43 +02:00
|
|
|
}
|
|
|
|
copy.inStaticContext = inStaticContext;
|
|
|
|
copy.parent = parent;
|
|
|
|
if (referencedClassVariables.size() > 0) {
|
|
|
|
- copy.referencedClassVariables = new HashMap<String, Variable>();
|
2023-09-26 20:11:32 +02:00
|
|
|
- copy.referencedClassVariables.putAll(referencedClassVariables);
|
|
|
|
+ copy.referencedClassVariables = new LinkedHashMap<String, Variable>(referencedClassVariables);
|
2023-09-26 15:49:47 +02:00
|
|
|
}
|
2023-09-26 19:58:43 +02:00
|
|
|
if (referencedLocalVariables.size() > 0) {
|
|
|
|
- copy.referencedLocalVariables = new HashMap<String, Variable>();
|
2023-09-26 20:11:32 +02:00
|
|
|
- copy.referencedLocalVariables.putAll(referencedLocalVariables);
|
|
|
|
+ copy.referencedLocalVariables = new LinkedHashMap<String, Variable>(referencedLocalVariables);
|
2023-09-26 15:49:47 +02:00
|
|
|
}
|
2023-09-26 19:58:43 +02:00
|
|
|
copy.resolvesDynamic = resolvesDynamic;
|
2023-09-26 20:11:32 +02:00
|
|
|
return copy;
|
|
|
|
@@ -126,7 +123,7 @@
|
2023-09-26 19:58:43 +02:00
|
|
|
|
|
|
|
public void putDeclaredVariable(Variable var) {
|
|
|
|
if (declaredVariables == Collections.EMPTY_MAP)
|
|
|
|
- declaredVariables = new HashMap<String, Variable>();
|
|
|
|
+ declaredVariables = new LinkedHashMap<String, Variable>();
|
|
|
|
declaredVariables.put(var.getName(), var);
|
2023-09-26 15:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-09-26 20:11:32 +02:00
|
|
|
@@ -144,13 +141,13 @@
|
2023-09-26 15:49:47 +02:00
|
|
|
|
2023-09-26 19:58:43 +02:00
|
|
|
public void putReferencedLocalVariable(Variable var) {
|
|
|
|
if (referencedLocalVariables == Collections.EMPTY_MAP)
|
|
|
|
- referencedLocalVariables = new HashMap<String, Variable>();
|
|
|
|
+ referencedLocalVariables = new LinkedHashMap<String, Variable>();
|
|
|
|
referencedLocalVariables.put(var.getName(), var);
|
2023-09-26 15:49:47 +02:00
|
|
|
}
|
|
|
|
|
2023-09-26 19:58:43 +02:00
|
|
|
public void putReferencedClassVariable(Variable var) {
|
|
|
|
if (referencedClassVariables == Collections.EMPTY_MAP)
|
|
|
|
- referencedClassVariables = new HashMap<String, Variable>();
|
|
|
|
+ referencedClassVariables = new LinkedHashMap<String, Variable>();
|
|
|
|
referencedClassVariables.put(var.getName(), var);
|
|
|
|
}
|
2023-09-26 18:57:41 +02:00
|
|
|
|
2023-09-26 19:58:43 +02:00
|
|
|
--- 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<ASTNode, List<ASTTransformation>> transforms;
|
|
|
|
private Map<Class<? extends ASTTransformation>, ASTTransformation> transformInstances;
|
|
|
|
private static CompilationUnit compUnit;
|
|
|
|
- private static Set<String> globalTransformNames = new HashSet<String>();
|
|
|
|
+ private static Set<String> globalTransformNames = new LinkedHashSet<String>();
|
|
|
|
|
|
|
|
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<Set<String>> varStack = new LinkedList<Set<String>>();
|
|
|
|
- Set<String> names = new HashSet<String>();
|
|
|
|
+ Set<String> names = new LinkedHashSet<String>();
|
|
|
|
for (FieldNode field : parent.getFields()) {
|
|
|
|
names.add(field.getName());
|
|
|
|
}
|
|
|
|
@@ -83,7 +83,7 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
private void addVariablesToStack(Parameter[] params) {
|
|
|
|
- Set<String> names = new HashSet<String>();
|
|
|
|
+ Set<String> names = new LinkedHashSet<String>();
|
|
|
|
names.addAll(varStack.getLast());
|
|
|
|
for (Parameter param : params) {
|
|
|
|
names.add(param.getName());
|
|
|
|
@@ -107,7 +107,7 @@
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void visitBlockStatement(BlockStatement block) {
|
|
|
|
- Set<String> names = new HashSet<String>();
|
|
|
|
+ Set<String> names = new LinkedHashSet<String>();
|
|
|
|
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;
|
2023-09-26 18:57:41 +02:00
|
|
|
|
2023-09-26 19:58:43 +02:00
|
|
|
@@ -111,7 +111,7 @@
|
2023-09-26 18:57:41 +02:00
|
|
|
}
|
|
|
|
|
2023-09-26 19:58:43 +02:00
|
|
|
private Set<ClassNode> getInterfacesAndSuperInterfaces(ClassNode type) {
|
|
|
|
- Set<ClassNode> res = new HashSet<ClassNode>();
|
|
|
|
+ Set<ClassNode> res = new LinkedHashSet<ClassNode>();
|
|
|
|
if (type.isInterface()) {
|
|
|
|
res.add(type);
|
|
|
|
return res;
|