fix: IllegalArgumentException

This commit is contained in:
huanghongxun
2020-04-23 09:50:22 +08:00
parent 383de6cb2e
commit eb9d123176

View File

@@ -60,6 +60,7 @@ public class AuthlibInjectorServer implements Observable {
private static final Gson GSON = new GsonBuilder().create();
public static AuthlibInjectorServer locateServer(String url) throws IOException {
try {
url = parseInputUrl(url);
HttpURLConnection conn;
int redirectCount = 0;
@@ -87,6 +88,9 @@ public class AuthlibInjectorServer implements Observable {
} finally {
conn.disconnect();
}
} catch (IllegalArgumentException e) {
throw new IOException(e);
}
}
private static Optional<String> getApiLocationIndication(URLConnection conn) {