forked from pool/groovy18
This commit is contained in:
parent
add988e2c1
commit
4a72a27ddb
@ -1,222 +1,138 @@
|
|||||||
--- groovy-core-GROOVY_1_8_9/src/main/groovy/lang/ExpandoMetaClass.java 2023-09-26 13:31:23.322875980 +0200
|
--- 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/groovy/lang/ExpandoMetaClass.java 2023-09-26 18:35:02.982905358 +0200
|
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/ClassNode.java 2023-09-26 19:47:32.055269643 +0200
|
||||||
@@ -21,9 +21,8 @@
|
@@ -406,7 +406,7 @@
|
||||||
import java.util.ArrayList;
|
}
|
||||||
import java.util.Collection;
|
|
||||||
|
public Set<ClassNode> getAllInterfaces () {
|
||||||
|
- Set<ClassNode> res = new HashSet<ClassNode>();
|
||||||
|
+ Set<ClassNode> res = new LinkedHashSet<ClassNode>();
|
||||||
|
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 19:45:48.534571007 +0200
|
||||||
|
@@ -16,8 +16,8 @@
|
||||||
|
package org.codehaus.groovy.ast;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
-import java.util.HashSet;
|
-import java.util.HashMap;
|
||||||
+import java.util.TreeSet;
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
-import java.util.LinkedHashSet;
|
+import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
@@ -279,7 +278,7 @@
|
|
||||||
final private boolean allowChangesAfterInit;
|
|
||||||
public boolean inRegistry;
|
|
||||||
|
|
||||||
- private final Set<MetaMethod> inheritedMetaMethods = new HashSet<MetaMethod>();
|
|
||||||
+ private final Set<MetaMethod> inheritedMetaMethods = new TreeSet<MetaMethod>();
|
|
||||||
private final Map<String, MetaProperty> beanPropertyCache = new ConcurrentHashMap<String, MetaProperty>();
|
|
||||||
private final Map<String, MetaProperty> staticBeanPropertyCache = new ConcurrentHashMap<String, MetaProperty>();
|
|
||||||
private final Map<MethodKey, MetaMethod> expandoMethods = new ConcurrentHashMap<MethodKey, MetaMethod>();
|
|
||||||
@@ -291,7 +290,7 @@
|
|
||||||
private final ConcurrentHashMap expandoSubclassMethods = new ConcurrentHashMap();
|
|
||||||
private final Map<String, MetaProperty> expandoProperties = new ConcurrentHashMap<String, MetaProperty>();
|
|
||||||
private ClosureStaticMetaMethod invokeStaticMethodMethod;
|
|
||||||
- private final Set<MixinInMetaClass> mixinClasses = new LinkedHashSet<MixinInMetaClass>();
|
|
||||||
+ private final Set<MixinInMetaClass> mixinClasses = new TreeSet<MixinInMetaClass>();
|
|
||||||
|
|
||||||
private ExpandoMetaClass(Class theClass, boolean register, boolean allowChangesAfterInit, MetaMethod[] add) {
|
|
||||||
super(GroovySystem.getMetaClassRegistry(), theClass, add);
|
|
||||||
--- 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 16:00:10.274451173 +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 TreeMap();
|
|
||||||
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 TreeMap();
|
|
||||||
if (closureMap != null) {
|
|
||||||
map = closureMap;
|
|
||||||
}
|
|
||||||
--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ant/Groovyc.java 2023-09-26 13:31:23.336209403 +0200
|
|
||||||
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ant/Groovyc.java 2023-09-26 13:31:35.556291444 +0200
|
|
||||||
@@ -53,11 +53,11 @@
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.Iterator;
|
|
||||||
-import java.util.LinkedHashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.StringTokenizer;
|
|
||||||
+import java.util.TreeSet;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compiles Groovy source files. This task can take the following arguments:
|
@@ -107,17 +107,17 @@
|
||||||
@@ -127,7 +127,7 @@
|
VariableScope copy = new VariableScope();
|
||||||
private boolean keepStubs;
|
copy.clazzScope = clazzScope;
|
||||||
private String scriptBaseClass;
|
if (declaredVariables.size() > 0) {
|
||||||
|
- copy.declaredVariables = new HashMap<String, Variable>();
|
||||||
|
+ copy.declaredVariables = new LinkedHashMap<String, Variable>();
|
||||||
|
copy.declaredVariables.putAll(declaredVariables);
|
||||||
|
}
|
||||||
|
copy.inStaticContext = inStaticContext;
|
||||||
|
copy.parent = parent;
|
||||||
|
if (referencedClassVariables.size() > 0) {
|
||||||
|
- copy.referencedClassVariables = new HashMap<String, Variable>();
|
||||||
|
+ copy.referencedClassVariables = new LinkedHashMap<String, Variable>();
|
||||||
|
copy.referencedClassVariables.putAll(referencedClassVariables);
|
||||||
|
}
|
||||||
|
if (referencedLocalVariables.size() > 0) {
|
||||||
|
- copy.referencedLocalVariables = new HashMap<String, Variable>();
|
||||||
|
+ copy.referencedLocalVariables = new LinkedHashMap<String, Variable>();
|
||||||
|
copy.referencedLocalVariables.putAll(referencedLocalVariables);
|
||||||
|
}
|
||||||
|
copy.resolvesDynamic = resolvesDynamic;
|
||||||
|
@@ -126,7 +126,7 @@
|
||||||
|
|
||||||
- private Set<String> scriptExtensions = new LinkedHashSet<String>();
|
public void putDeclaredVariable(Variable var) {
|
||||||
+ private Set<String> scriptExtensions = new TreeSet<String>();
|
if (declaredVariables == Collections.EMPTY_MAP)
|
||||||
|
- declaredVariables = new HashMap<String, Variable>();
|
||||||
/**
|
+ declaredVariables = new LinkedHashMap<String, Variable>();
|
||||||
* Adds a path for source compilation.
|
declaredVariables.put(var.getName(), var);
|
||||||
@@ -658,7 +658,7 @@
|
|
||||||
*/
|
|
||||||
protected void resetFileLists() {
|
|
||||||
compileList = new File[0];
|
|
||||||
- scriptExtensions = new LinkedHashSet<String>();
|
|
||||||
+ scriptExtensions = new TreeSet<String>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@@ -144,13 +144,13 @@
|
||||||
--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java 2023-09-26 13:31:23.336209403 +0200
|
|
||||||
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java 2023-09-26 18:44:07.573225992 +0200
|
public void putReferencedLocalVariable(Variable var) {
|
||||||
@@ -42,7 +42,7 @@
|
if (referencedLocalVariables == Collections.EMPTY_MAP)
|
||||||
import java.security.AccessController;
|
- referencedLocalVariables = new HashMap<String, Variable>();
|
||||||
import java.security.PrivilegedAction;
|
+ referencedLocalVariables = new LinkedHashMap<String, Variable>();
|
||||||
import java.util.ArrayList;
|
referencedLocalVariables.put(var.getName(), var);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- 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.HashSet;
|
||||||
+import java.util.TreeSet;
|
+import java.util.LinkedHashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -2573,7 +2573,7 @@
|
import java.util.Set;
|
||||||
private void checkDuplicateNamedParams(AST elist, List expressionList) {
|
@@ -71,7 +71,7 @@
|
||||||
if (expressionList.isEmpty()) return;
|
ClassNode targetClass = getTargetClass(source, annotation);
|
||||||
|
|
||||||
- Set<String> namedArgumentNames = new HashSet<String>();
|
final LinkedList<Set<String>> varStack = new LinkedList<Set<String>>();
|
||||||
+ Set<String> namedArgumentNames = new TreeSet<String>();
|
- Set<String> names = new HashSet<String>();
|
||||||
for (Object expression : expressionList) {
|
+ Set<String> names = new LinkedHashSet<String>();
|
||||||
MapEntryExpression meExp = (MapEntryExpression) expression;
|
for (FieldNode field : parent.getFields()) {
|
||||||
if (meExp.getKeyExpression() instanceof ConstantExpression) {
|
names.add(field.getName());
|
||||||
--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/ModuleNode.java 2023-09-26 13:31:23.339542759 +0200
|
|
||||||
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/ast/ModuleNode.java 2023-09-26 18:45:07.250294772 +0200
|
|
||||||
@@ -44,10 +44,10 @@
|
|
||||||
private BlockStatement statementBlock = new BlockStatement();
|
|
||||||
List<ClassNode> classes = new LinkedList<ClassNode>();
|
|
||||||
private List<MethodNode> methods = new ArrayList<MethodNode>();
|
|
||||||
- private Map<String, ImportNode> imports = new HashMap<String, ImportNode>();
|
|
||||||
+ private Map<String, ImportNode> imports = new TreeMap<String, ImportNode>();
|
|
||||||
private List<ImportNode> starImports = new ArrayList<ImportNode>();
|
|
||||||
- private Map<String, ImportNode> staticImports = new LinkedHashMap<String, ImportNode>();
|
|
||||||
- private Map<String, ImportNode> staticStarImports = new LinkedHashMap<String, ImportNode>();
|
|
||||||
+ private Map<String, ImportNode> staticImports = new TreeMap<String, ImportNode>();
|
|
||||||
+ private Map<String, ImportNode> staticStarImports = new TreeMap<String, ImportNode>();
|
|
||||||
private CompileUnit unit;
|
|
||||||
private PackageNode packageNode;
|
|
||||||
private String description;
|
|
||||||
--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-26 13:31:23.342876115 +0200
|
|
||||||
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-26 15:48:16.126304739 +0200
|
|
||||||
@@ -139,7 +139,7 @@
|
|
||||||
for (ClassNode classNode : classNodes) {
|
|
||||||
interfaces.add(classNode.getName());
|
|
||||||
}
|
}
|
||||||
- Set<String> interfaceSet = new HashSet<String>(interfaces);
|
@@ -83,7 +83,7 @@
|
||||||
+ Set<String> interfaceSet = new TreeSet<String>(interfaces);
|
}
|
||||||
if (interfaceSet.size() != interfaces.size()) {
|
|
||||||
throw new RuntimeParserException("Duplicate interfaces in implements list: " + interfaces, classNode);
|
private void addVariablesToStack(Parameter[] params) {
|
||||||
}
|
- Set<String> names = new HashSet<String>();
|
||||||
@@ -832,7 +832,7 @@
|
+ Set<String> names = new LinkedHashSet<String>();
|
||||||
List<Statement> staticStatements = new ArrayList<Statement>();
|
names.addAll(varStack.getLast());
|
||||||
final boolean isEnum = node.isEnum();
|
for (Parameter param : params) {
|
||||||
List<Statement> initStmtsAfterEnumValuesInit = new ArrayList<Statement>();
|
names.add(param.getName());
|
||||||
- Set<String> explicitStaticPropsInEnum = new HashSet<String>();
|
@@ -107,7 +107,7 @@
|
||||||
+ Set<String> explicitStaticPropsInEnum = new TreeSet<String>();
|
|
||||||
if (isEnum) {
|
@Override
|
||||||
for (PropertyNode propNode : node.getProperties()) {
|
public void visitBlockStatement(BlockStatement block) {
|
||||||
if (!propNode.isSynthetic() && propNode.getField().isStatic()) {
|
- Set<String> names = new HashSet<String>();
|
||||||
@@ -1051,12 +1051,12 @@
|
+ 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;
|
||||||
|
|
||||||
|
@@ -111,7 +111,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addCovariantMethods(ClassNode classNode) {
|
private Set<ClassNode> getInterfacesAndSuperInterfaces(ClassNode type) {
|
||||||
- Map methodsToAdd = new HashMap();
|
- Set<ClassNode> res = new HashSet<ClassNode>();
|
||||||
- Map genericsSpec = new HashMap();
|
+ Set<ClassNode> res = new LinkedHashSet<ClassNode>();
|
||||||
+ Map methodsToAdd = new TreeMap();
|
if (type.isInterface()) {
|
||||||
+ Map genericsSpec = new TreeMap();
|
res.add(type);
|
||||||
|
return res;
|
||||||
// unimplemented abstract methods from interfaces
|
|
||||||
- Map abstractMethods = new HashMap();
|
|
||||||
- Map<String, MethodNode> allInterfaceMethods = new HashMap<String, MethodNode>();
|
|
||||||
+ Map abstractMethods = new TreeMap();
|
|
||||||
+ Map<String, MethodNode> allInterfaceMethods = new TreeMap<String, MethodNode>();
|
|
||||||
ClassNode[] interfaces = classNode.getInterfaces();
|
|
||||||
for (ClassNode iface : interfaces) {
|
|
||||||
Map ifaceMethodsMap = iface.getDeclaredMethodsMap();
|
|
||||||
@@ -1086,7 +1086,7 @@
|
|
||||||
|
|
||||||
addCovariantMethods(classNode, declaredMethods, abstractMethods, methodsToAdd, genericsSpec);
|
|
||||||
|
|
||||||
- Map<String, MethodNode> declaredMethodsMap = new HashMap<String, MethodNode>();
|
|
||||||
+ Map<String, MethodNode> declaredMethodsMap = new TreeMap<String, MethodNode>();
|
|
||||||
if (methodsToAdd.size() > 0) {
|
|
||||||
for (MethodNode mn : declaredMethods) {
|
|
||||||
declaredMethodsMap.put(mn.getTypeDescriptor(), mn);
|
|
||||||
@@ -1336,7 +1336,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
private Map createGenericsSpec(ClassNode current, Map oldSpec) {
|
|
||||||
- Map ret = new HashMap(oldSpec);
|
|
||||||
+ Map ret = new TreeMap(oldSpec);
|
|
||||||
// ret contains the type specs, what we now need is the type spec for the
|
|
||||||
// current class. To get that we first apply the type parameters to the
|
|
||||||
// current class and then use the type names of the current class to reset
|
|
||||||
--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/runtime/ClassExtender.java 2023-09-26 13:31:23.352876182 +0200
|
|
||||||
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/runtime/ClassExtender.java 2023-09-26 18:56:10.658079617 +0200
|
|
||||||
@@ -17,7 +17,7 @@
|
|
||||||
|
|
||||||
import groovy.lang.Closure;
|
|
||||||
|
|
||||||
-import java.util.HashMap;
|
|
||||||
+import java.util.TreeMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
@@ -82,6 +82,6 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
protected Map createMap() {
|
|
||||||
- return new HashMap();
|
|
||||||
+ return new TreeMap();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/FileSystemCompiler.java 2023-09-26 13:31:23.359542893 +0200
|
|
||||||
+++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/FileSystemCompiler.java 2023-09-26 13:54:05.625117288 +0200
|
|
||||||
@@ -246,6 +246,7 @@
|
|
||||||
if (errors) {
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
+ Collections.sort(fileList);
|
|
||||||
return fileList.toArray(new String[fileList.size()]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user