Try to make some of the suggested changes

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2022-12-21 18:13:41 +00:00
parent 87bcefd08a
commit 94067f34cf
6 changed files with 14 additions and 84 deletions

View File

@ -45,8 +45,7 @@ import java.util.Map;
import org.prismlauncher.utils.Base64;
import org.prismlauncher.utils.JsonParser;
import org.prismlauncher.utils.url.NullConnection;
import org.prismlauncher.utils.url.UrlUtils;
import org.prismlauncher.utils.UrlUtils;
@SuppressWarnings("unchecked")
final class Handler extends URLStreamHandler {
@ -71,10 +70,6 @@ final class Handler extends URLStreamHandler {
@Override
protected URLConnection openConnection(URL address, Proxy proxy) throws IOException {
address = redirect(address);
if (address == null)
return NullConnection.INSTANCE;
return UrlUtils.openHttpConnection(address, proxy);
}

View File

@ -42,8 +42,8 @@ import java.net.URLStreamHandlerFactory;
import org.prismlauncher.fix.Fix;
import org.prismlauncher.utils.Base64;
import org.prismlauncher.utils.Parameters;
import org.prismlauncher.utils.UrlUtils;
import org.prismlauncher.utils.logging.Log;
import org.prismlauncher.utils.url.UrlUtils;
/**
* Fixes skins by redirecting to other URLs.