This commit is contained in:
parent
e39da85f61
commit
f78527acbe
@ -1,3 +1,41 @@
|
||||
--- groovy-core-GROOVY_1_8_9/src/main/groovy/util/ProxyGenerator.java 2023-09-26 13:31:23.332876047 +0200
|
||||
+++ groovy-core-GROOVY_1_8_9/src/main/groovy/util/ProxyGenerator.java 2023-09-26 22:14:38.014274779 +0200
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
public GroovyObject instantiateAggregateFromBaseClass(Closure cl, Class clazz) {
|
||||
- Map<String, Closure> m = new HashMap<String, Closure>();
|
||||
+ Map<String, Closure> m = new TreeMap<String, Closure>();
|
||||
m.put("*", cl);
|
||||
return instantiateAggregateFromBaseClass(m, clazz, null);
|
||||
}
|
||||
@@ -132,7 +132,7 @@
|
||||
}
|
||||
|
||||
public GroovyObject instantiateAggregate(Map closureMap, List<Class> interfaces, Class clazz, Object[] constructorArgs) {
|
||||
- Map map = new HashMap();
|
||||
+ Map map = new LinkedHashMap();
|
||||
if (closureMap != null) {
|
||||
map = closureMap;
|
||||
}
|
||||
@@ -181,7 +181,7 @@
|
||||
buffer.append(" }\n");
|
||||
|
||||
// add overwriting methods
|
||||
- Map<String, Method> selectedMethods = new HashMap<String, Method>();
|
||||
+ Map<String, Method> selectedMethods = new TreeMap<String, Method>();
|
||||
List<Method> publicAndProtectedMethods = getInheritedMethods(baseClass, new ArrayList<Method>());
|
||||
boolean closureIndicator = map.containsKey("*");
|
||||
for (Method method : publicAndProtectedMethods) {
|
||||
@@ -269,7 +269,7 @@
|
||||
}
|
||||
|
||||
public GroovyObject instantiateDelegateWithBaseClass(Map closureMap, List<Class> interfaces, Object delegate, Class baseClass, String name) {
|
||||
- Map map = new HashMap();
|
||||
+ Map map = new LinkedHashMap();
|
||||
if (closureMap != null) {
|
||||
map = closureMap;
|
||||
}
|
||||
--- 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 @@
|
||||
@ -10,60 +48,61 @@
|
||||
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 19:45:48.534571007 +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.TreeMap;
|
||||
+import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -107,17 +107,17 @@
|
||||
@@ -107,18 +107,15 @@
|
||||
VariableScope copy = new VariableScope();
|
||||
copy.clazzScope = clazzScope;
|
||||
if (declaredVariables.size() > 0) {
|
||||
- copy.declaredVariables = new HashMap<String, Variable>();
|
||||
+ copy.declaredVariables = new TreeMap<String, Variable>();
|
||||
copy.declaredVariables.putAll(declaredVariables);
|
||||
- copy.declaredVariables.putAll(declaredVariables);
|
||||
+ copy.declaredVariables = new LinkedHashMap<String, Variable>(declaredVariables);
|
||||
}
|
||||
copy.inStaticContext = inStaticContext;
|
||||
copy.parent = parent;
|
||||
if (referencedClassVariables.size() > 0) {
|
||||
- copy.referencedClassVariables = new HashMap<String, Variable>();
|
||||
+ copy.referencedClassVariables = new TreeMap<String, Variable>();
|
||||
copy.referencedClassVariables.putAll(referencedClassVariables);
|
||||
- copy.referencedClassVariables.putAll(referencedClassVariables);
|
||||
+ copy.referencedClassVariables = new LinkedHashMap<String, Variable>(referencedClassVariables);
|
||||
}
|
||||
if (referencedLocalVariables.size() > 0) {
|
||||
- copy.referencedLocalVariables = new HashMap<String, Variable>();
|
||||
+ copy.referencedLocalVariables = new TreeMap<String, Variable>();
|
||||
copy.referencedLocalVariables.putAll(referencedLocalVariables);
|
||||
- copy.referencedLocalVariables.putAll(referencedLocalVariables);
|
||||
+ copy.referencedLocalVariables = new LinkedHashMap<String, Variable>(referencedLocalVariables);
|
||||
}
|
||||
copy.resolvesDynamic = resolvesDynamic;
|
||||
@@ -126,7 +126,7 @@
|
||||
return copy;
|
||||
@@ -126,7 +123,7 @@
|
||||
|
||||
public void putDeclaredVariable(Variable var) {
|
||||
if (declaredVariables == Collections.EMPTY_MAP)
|
||||
- declaredVariables = new HashMap<String, Variable>();
|
||||
+ declaredVariables = new TreeMap<String, Variable>();
|
||||
+ declaredVariables = new LinkedHashMap<String, Variable>();
|
||||
declaredVariables.put(var.getName(), var);
|
||||
}
|
||||
|
||||
@@ -144,13 +144,13 @@
|
||||
@@ -144,13 +141,13 @@
|
||||
|
||||
public void putReferencedLocalVariable(Variable var) {
|
||||
if (referencedLocalVariables == Collections.EMPTY_MAP)
|
||||
- referencedLocalVariables = new HashMap<String, Variable>();
|
||||
+ referencedLocalVariables = new TreeMap<String, Variable>();
|
||||
+ referencedLocalVariables = new LinkedHashMap<String, Variable>();
|
||||
referencedLocalVariables.put(var.getName(), var);
|
||||
}
|
||||
|
||||
public void putReferencedClassVariable(Variable var) {
|
||||
if (referencedClassVariables == Collections.EMPTY_MAP)
|
||||
- referencedClassVariables = new HashMap<String, Variable>();
|
||||
+ referencedClassVariables = new TreeMap<String, Variable>();
|
||||
+ referencedClassVariables = new LinkedHashMap<String, Variable>();
|
||||
referencedClassVariables.put(var.getName(), var);
|
||||
}
|
||||
|
||||
@ -74,7 +113,7 @@
|
||||
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 TreeSet<String>();
|
||||
+ private static Set<String> globalTransformNames = new LinkedHashSet<String>();
|
||||
|
||||
private ASTTransformationVisitor(CompilePhase phase) {
|
||||
this.phase = phase;
|
||||
@ -85,7 +124,7 @@
|
||||
|
||||
import java.util.Arrays;
|
||||
-import java.util.HashSet;
|
||||
+import java.util.TreeSet;
|
||||
+import java.util.LinkedHashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -94,7 +133,7 @@
|
||||
|
||||
final LinkedList<Set<String>> varStack = new LinkedList<Set<String>>();
|
||||
- Set<String> names = new HashSet<String>();
|
||||
+ Set<String> names = new TreeSet<String>();
|
||||
+ Set<String> names = new LinkedHashSet<String>();
|
||||
for (FieldNode field : parent.getFields()) {
|
||||
names.add(field.getName());
|
||||
}
|
||||
@ -103,7 +142,7 @@
|
||||
|
||||
private void addVariablesToStack(Parameter[] params) {
|
||||
- Set<String> names = new HashSet<String>();
|
||||
+ Set<String> names = new TreeSet<String>();
|
||||
+ Set<String> names = new LinkedHashSet<String>();
|
||||
names.addAll(varStack.getLast());
|
||||
for (Parameter param : params) {
|
||||
names.add(param.getName());
|
||||
@ -112,7 +151,7 @@
|
||||
@Override
|
||||
public void visitBlockStatement(BlockStatement block) {
|
||||
- Set<String> names = new HashSet<String>();
|
||||
+ Set<String> names = new TreeSet<String>();
|
||||
+ Set<String> names = new LinkedHashSet<String>();
|
||||
names.addAll(varStack.getLast());
|
||||
varStack.add(names);
|
||||
super.visitBlockStatement(block);
|
||||
|
Loading…
x
Reference in New Issue
Block a user