diff --git a/src/main/java/makamys/coretweaks/optimization/PrefixedClasspathResourceAccelerator.java b/src/main/java/makamys/coretweaks/optimization/PrefixedClasspathResourceAccelerator.java index 315d99b..9709fa7 100644 --- a/src/main/java/makamys/coretweaks/optimization/PrefixedClasspathResourceAccelerator.java +++ b/src/main/java/makamys/coretweaks/optimization/PrefixedClasspathResourceAccelerator.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; @@ -39,7 +40,7 @@ public class PrefixedClasspathResourceAccelerator { private void init() { long t0 = System.nanoTime(); classSources = new ArrayList<>(); - for(URL url : Launch.classLoader.getSources()) { + for(URL url : Launch.classLoader.getSources().stream().distinct().collect(Collectors.toList())) { try { classSources.add(Index.fromURL(url)); } catch(Exception e) {