Improve the skin fix code

- Spoof 404 instead of keeping original URL.
- Move JsonParseException to the package.
- Pass proxy as null to reduce code duplication.

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2022-11-20 09:16:30 +00:00
parent cfeadf858e
commit ead59c0246
8 changed files with 153 additions and 79 deletions

View File

@@ -59,6 +59,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.prismlauncher.exception.JsonParseException;
/**
* Single-file JSON parser to allow for usage in versions without GSON.
*/
@@ -420,14 +422,4 @@ public final class JsonParser {
return character() == 'n' && read() == 'u' && read() == 'l' && read() == 'l';
}
public static class JsonParseException extends IOException {
private static final long serialVersionUID = 1L;
public JsonParseException(String message) {
super(message);
}
}
}