diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2022-11-19 08:54:17 +0000 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2022-11-19 08:54:17 +0000 |
commit | 669eef92eb426ea500c3bdaf5ec5b07d98e7c637 (patch) | |
tree | bcdf72a6d7f2e7c2531060ae984049667f822277 /libraries/launcher/net/minecraft/Launcher.java | |
parent | 32c2ad2bbd087b83fe5e1cfe03926410ec95bcca (diff) | |
download | PrismLauncher-669eef92eb426ea500c3bdaf5ec5b07d98e7c637.tar.gz PrismLauncher-669eef92eb426ea500c3bdaf5ec5b07d98e7c637.tar.bz2 PrismLauncher-669eef92eb426ea500c3bdaf5ec5b07d98e7c637.zip |
Make requested changes and utilise AssertionError
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'libraries/launcher/net/minecraft/Launcher.java')
-rw-r--r-- | libraries/launcher/net/minecraft/Launcher.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libraries/launcher/net/minecraft/Launcher.java b/libraries/launcher/net/minecraft/Launcher.java index a721495a..646e2e3e 100644 --- a/libraries/launcher/net/minecraft/Launcher.java +++ b/libraries/launcher/net/minecraft/Launcher.java @@ -64,8 +64,6 @@ import java.net.URL; import java.util.HashMap; import java.util.Map; -import org.prismlauncher.utils.logging.Log; - /** * WARNING: This class is reflectively accessed by legacy Forge versions. * <p> @@ -97,14 +95,13 @@ public final class Launcher extends Applet implements AppletStub { if (documentBase == null) { if (applet.getClass().getPackage().getName().startsWith("com.mojang.")) { // Special case only for Classic versions - documentBase = new URL("http", "www.minecraft.net", 80, "/game/"); + documentBase = new URL("http://www.minecraft.net:80/game/"); } else { documentBase = new URL("http://www.minecraft.net/game/"); } } } catch (MalformedURLException e) { - // handle gracefully - it won't happen, but Java requires that it is caught - Log.error("Failed to parse document base URL", e); + throw new AssertionError(e); } this.documentBase = documentBase; @@ -143,8 +140,7 @@ public final class Launcher extends Applet implements AppletStub { try { return new URL("http://www.minecraft.net/game/"); } catch (MalformedURLException e) { - Log.error("Failed to parse codebase URL", e); - return null; + throw new AssertionError(e); } } |