diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java index e618b9c7..8bee744a 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/LaunchServer.java @@ -36,8 +36,6 @@ import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.serialize.signed.SignedObjectHolder; import pro.gravit.utils.helper.*; -import pro.gravit.launchserver.binary.*; -import pro.gravit.launchserver.manangers.*; import pro.gravit.utils.Version; import pro.gravit.utils.command.CommandHandler; import pro.gravit.utils.command.JLineCommandHandler; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/websocket/WebSocketFrameHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/websocket/WebSocketFrameHandler.java index 1f7880d9..5fcc9b0e 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/websocket/WebSocketFrameHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/websocket/WebSocketFrameHandler.java @@ -8,6 +8,7 @@ import io.netty.util.concurrent.GlobalEventExecutor; import pro.gravit.launchserver.LaunchServer; import pro.gravit.launchserver.socket.Client; +import pro.gravit.utils.helper.CommonHelper; import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.LogHelper; @@ -15,7 +16,7 @@ public class WebSocketFrameHandler extends SimpleChannelInboundHandler { public static LaunchServer server; - public static GsonBuilder builder = new GsonBuilder(); + public static GsonBuilder builder = CommonHelper.newBuilder(); public static WebSocketService service = new WebSocketService(new DefaultChannelGroup(GlobalEventExecutor.INSTANCE), LaunchServer.server, builder); public NettyConnectContext context; diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StandartClientWebSocketService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StandartClientWebSocketService.java index 8ed92f36..eb5a518b 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StandartClientWebSocketService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/request/websockets/StandartClientWebSocketService.java @@ -4,6 +4,7 @@ import pro.gravit.launcher.events.request.ErrorRequestEvent; import pro.gravit.launcher.request.RequestException; import pro.gravit.launcher.request.ResultInterface; +import pro.gravit.utils.helper.CommonHelper; import pro.gravit.utils.helper.JVMHelper; import pro.gravit.launcher.request.Request; import pro.gravit.utils.helper.LogHelper; @@ -18,7 +19,7 @@ public class StandartClientWebSocketService extends ClientWebSocketService { public WaitEventHandler waitEventHandler = new WaitEventHandler(); public StandartClientWebSocketService(GsonBuilder gsonBuilder, String address, int i) throws SSLException { - super(gsonBuilder, address, i); + super(null, address, i); } public class RequestFuture implements Future { @@ -106,7 +107,7 @@ public RequestFuture asyncSendRequest(RequestInterface request) throws IOExcepti public static StandartClientWebSocketService initWebSockets(String address, boolean async) { StandartClientWebSocketService service; try { - service = new StandartClientWebSocketService(new GsonBuilder(), address, 5000); + service = new StandartClientWebSocketService(CommonHelper.newBuilder(), address, 5000); } catch (SSLException e) { LogHelper.error(e); return null;