Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36c97f3e authored by Nikolas Havrikov's avatar Nikolas Havrikov
Browse files

Replace LinkedList by a more performant collection

This is a semi-automatic change.
See https://errorprone.info/bugpattern/JdkObsolete for the rationale.

Test: make
Bug: 221046110
Change-Id: I2c9ff5df7c6496d7e22e9d867d1c1d5cd43a55a1
parent dbb79760
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@ import java.io.FileOutputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

public class Util {
@@ -48,7 +48,7 @@ public class Util {
        Class<?> vmClassLoaderClass = Class.forName("java.lang.VMClassLoader");
        Method getResources = vmClassLoaderClass.getDeclaredMethod("getResources", String.class);
        getResources.setAccessible(true);
        LinkedList<DexFile> res = new LinkedList<>();
        ArrayList<DexFile> res = new ArrayList<>();
        for (int i = 1;; i++) {
            try {
                String name = "classes" + (i > 1 ? String.valueOf(i) : "") + ".dex";