groovy18/reproducible-builds.patch

99 lines
4.3 KiB
Diff
Raw Normal View History

--- 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:
@@ -127,7 +127,7 @@
private boolean keepStubs;
private String scriptBaseClass;
- private Set<String> scriptExtensions = new LinkedHashSet<String>();
+ private Set<String> scriptExtensions = new TreeSet<String>();
/**
* Adds a path for source compilation.
@@ -658,7 +658,7 @@
*/
protected void resetFileLists() {
compileList = new File[0];
- scriptExtensions = new LinkedHashSet<String>();
+ scriptExtensions = new TreeSet<String>();
}
/**
--- 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);
+ Set<String> interfaceSet = new TreeSet<String>(interfaces);
if (interfaceSet.size() != interfaces.size()) {
throw new RuntimeParserException("Duplicate interfaces in implements list: " + interfaces, classNode);
}
@@ -832,7 +832,7 @@
List<Statement> staticStatements = new ArrayList<Statement>();
final boolean isEnum = node.isEnum();
List<Statement> initStmtsAfterEnumValuesInit = new ArrayList<Statement>();
- Set<String> explicitStaticPropsInEnum = new HashSet<String>();
+ Set<String> explicitStaticPropsInEnum = new TreeSet<String>();
if (isEnum) {
for (PropertyNode propNode : node.getProperties()) {
if (!propNode.isSynthetic() && propNode.getField().isStatic()) {
@@ -1051,12 +1051,12 @@
}
protected void addCovariantMethods(ClassNode classNode) {
- Map methodsToAdd = new HashMap();
- Map genericsSpec = new HashMap();
+ Map methodsToAdd = new TreeMap();
+ Map genericsSpec = new TreeMap();
// 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/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()]);
}
}