mirror of
https://github.com/revanced/smali.git
synced 2025-05-08 02:14:32 +02:00
Make smali file iteration more deterministic
In some cases, even when running in single threaded mode (-j 1), smali could produce slightly different results if files are not listed in a consistent order. This ensures that we assemble a given set of smali files in a consistent order when running in single-threaded mode, regardless of the order they are listed in.
This commit is contained in:
parent
681222d391
commit
37eb703409
@ -50,6 +50,7 @@ import java.util.Arrays;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
public class Smali {
|
||||
@ -73,7 +74,7 @@ public class Smali {
|
||||
* @return true if assembly completed with no errors, or false if errors were encountered
|
||||
*/
|
||||
public static boolean assemble(final SmaliOptions options, List<String> input) throws IOException {
|
||||
LinkedHashSet<File> filesToProcessSet = new LinkedHashSet<File>();
|
||||
TreeSet<File> filesToProcessSet = new TreeSet<File>();
|
||||
|
||||
for (String fileToProcess: input) {
|
||||
File argFile = new File(fileToProcess);
|
||||
|
Loading…
x
Reference in New Issue
Block a user