diff --git a/gradle.properties b/gradle.properties index aae078cc3..21a2d71f5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ accesstransformers_version=10.0.1 coremods_version=7.0.3 eventbus_version=7.0.16 modlauncher_version=10.1.10 -securejarhandler_version=3.0.4 +securejarhandler_version=3.0.7 bootstraplauncher_version=1.1.8 asm_version=9.5 mixin_version=0.13.1+mixin.0.8.5 diff --git a/loader/src/test/java/net/neoforged/fml/common/asm/RuntimeDistCleanerTest.java b/loader/src/test/java/net/neoforged/fml/common/asm/RuntimeDistCleanerTest.java index 36854a9cc..6e1cf0247 100644 --- a/loader/src/test/java/net/neoforged/fml/common/asm/RuntimeDistCleanerTest.java +++ b/loader/src/test/java/net/neoforged/fml/common/asm/RuntimeDistCleanerTest.java @@ -124,7 +124,7 @@ private void transformTestClass(Dist dist, @Language("java") String classContent private void transformTestClass(Dist dist, @Language("java") String classContent, Consumer> asserter) throws Exception { var distCleaner = new RuntimeDistCleaner(); - distCleaner.getExtension().accept(dist); + distCleaner.setDistribution(dist); var modJar = tempDir.resolve("modjar.jar"); new ModFileBuilder(modJar) diff --git a/loader/src/test/java/net/neoforged/fml/loading/LauncherTest.java b/loader/src/test/java/net/neoforged/fml/loading/LauncherTest.java index bea882c43..e828570a3 100644 --- a/loader/src/test/java/net/neoforged/fml/loading/LauncherTest.java +++ b/loader/src/test/java/net/neoforged/fml/loading/LauncherTest.java @@ -10,9 +10,7 @@ import static org.mockito.Mockito.when; import cpw.mods.cl.JarModuleFinder; -import cpw.mods.cl.ModularURLHandler; import cpw.mods.cl.ModuleClassLoader; -import cpw.mods.cl.UnionURLStreamHandler; import cpw.mods.jarhandling.SecureJar; import cpw.mods.modlauncher.Launcher; import cpw.mods.modlauncher.api.IEnvironment; @@ -43,7 +41,6 @@ import net.neoforged.neoforgespi.language.IModFileInfo; import net.neoforged.neoforgespi.language.IModInfo; import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.mockito.Mock; import org.mockito.MockedStatic; @@ -70,23 +67,6 @@ public abstract class LauncherTest { // and ModDirTransformerDiscoverer, which pick up files like mixin. Set locatedPaths = new HashSet<>(); - /** - * See https://github.com/McModLauncher/securejarhandler/pull/74 - */ - @BeforeAll - static void fixUpUnionUrlProtocol() throws Exception { - // Force Class-Init of ModuleClassLoader, since it'll set the URLStreamHandlerFactory and call initFrom - try { - new ModuleClassLoader(null, null, null); - } catch (Exception ignored) {} - - // Now fix up the handlers in the handler - var handlers = Map.of("union", new UnionURLStreamHandler()); - var handlersField = ModularURLHandler.class.getDeclaredField("handlers"); - handlersField.setAccessible(true); - handlersField.set(ModularURLHandler.INSTANCE, handlers); - } - @BeforeEach void setUp() throws IOException { Launcher.INSTANCE = launcher;