idea cleanup lancher

This commit is contained in:
dima_dencep 2022-09-24 00:27:54 +07:00
parent a1fdc4cc39
commit 045ed67f12
12 changed files with 18 additions and 28 deletions

View file

@ -7,7 +7,6 @@
import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.Request;
import pro.gravit.launcher.request.RequestService; import pro.gravit.launcher.request.RequestService;
import pro.gravit.launcher.request.WebSocketEvent; import pro.gravit.launcher.request.WebSocketEvent;
import pro.gravit.launcher.request.websockets.ClientWebSocketService;
import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.LogHelper;
public class BasicLauncherEventHandler implements RequestService.EventHandler { public class BasicLauncherEventHandler implements RequestService.EventHandler {

View file

@ -1,8 +1,6 @@
package pro.gravit.launcher.api; package pro.gravit.launcher.api;
import pro.gravit.launcher.LauncherEngine; import pro.gravit.launcher.LauncherEngine;
import pro.gravit.launcher.profiles.ClientProfile;
import pro.gravit.utils.helper.LogHelper;
public class SystemService { public class SystemService {
private SystemService() { private SystemService() {

View file

@ -3,7 +3,6 @@
import pro.gravit.launcher.Launcher; import pro.gravit.launcher.Launcher;
import pro.gravit.launcher.LauncherConfig; import pro.gravit.launcher.LauncherConfig;
import pro.gravit.launcher.LauncherEngine; import pro.gravit.launcher.LauncherEngine;
import pro.gravit.launcher.LauncherNetworkAPI;
import pro.gravit.launcher.client.events.client.ClientProcessBuilderCreateEvent; import pro.gravit.launcher.client.events.client.ClientProcessBuilderCreateEvent;
import pro.gravit.launcher.client.events.client.ClientProcessBuilderLaunchedEvent; import pro.gravit.launcher.client.events.client.ClientProcessBuilderLaunchedEvent;
import pro.gravit.launcher.client.events.client.ClientProcessBuilderParamsWrittedEvent; import pro.gravit.launcher.client.events.client.ClientProcessBuilderParamsWrittedEvent;
@ -28,7 +27,6 @@
import java.net.SocketAddress; import java.net.SocketAddress;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View file

@ -1,10 +1,8 @@
package pro.gravit.launcher.utils; package pro.gravit.launcher.utils;
import pro.gravit.launcher.AsyncDownloader; import pro.gravit.launcher.AsyncDownloader;
import pro.gravit.launcher.Launcher;
import pro.gravit.launcher.LauncherEngine; import pro.gravit.launcher.LauncherEngine;
import pro.gravit.launcher.LauncherInject; import pro.gravit.launcher.LauncherInject;
import pro.gravit.launcher.events.request.LauncherRequestEvent;
import pro.gravit.launcher.request.update.LauncherRequest; import pro.gravit.launcher.request.update.LauncherRequest;
import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.IOHelper;
import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.LogHelper;
@ -13,12 +11,10 @@
import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.HttpsURLConnection;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.security.KeyManagementException; import java.security.KeyManagementException;
import java.security.KeyStoreException; import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
@ -30,9 +26,11 @@
public class LauncherUpdater { public class LauncherUpdater {
@LauncherInject("launcher.certificatePinning") @LauncherInject("launcher.certificatePinning")
private static boolean isCertificatePinning; private static boolean isCertificatePinning;
public static void nothing() { public static void nothing() {
} }
private static Path getLauncherPath() { private static Path getLauncherPath() {
Path pathToCore = IOHelper.getCodeSource(IOHelper.class); Path pathToCore = IOHelper.getCodeSource(IOHelper.class);
Path pathToApi = IOHelper.getCodeSource(LauncherRequest.class); Path pathToApi = IOHelper.getCodeSource(LauncherRequest.class);

View file

@ -1,11 +1,8 @@
package pro.gravit.launcher.utils; package pro.gravit.launcher.utils;
import pro.gravit.utils.helper.JVMHelper;
import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.LogHelper;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.security.AccessController;
import java.security.PrivilegedAction;
public final class NativeJVMHalt { public final class NativeJVMHalt {
public final int haltCode; public final int haltCode;