From b36a623e6913ad157452d8ee08a5b1a94d8049dc Mon Sep 17 00:00:00 2001 From: zaxar163 Date: Sat, 23 Mar 2019 10:44:22 +0300 Subject: [PATCH] =?UTF-8?q?[ANY]=20=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C?= =?UTF-8?q?=D1=88=D0=BE=D0=B9=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3=20(Organize=20imports).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launchserver/auth/protect/ProtectHandler.java | 3 --- .../launchserver/auth/provider/AuthProvider.java | 2 -- .../java/ru/gravit/launchserver/command/Command.java | 4 ---- .../gravit/launchserver/command/auth/AuthCommand.java | 2 -- .../launchserver/command/handler/CommandHandler.java | 11 ----------- .../command/service/GetModulusCommand.java | 3 +-- .../launchserver/components/AuthLimiterComponent.java | 4 ---- .../launchserver/config/ProtectHandlerAdapter.java | 1 - .../launchserver/manangers/hook/AuthHookManager.java | 1 - .../response/profile/ProfileByUsernameResponse.java | 1 - .../websocket/json/auth/JoinServerResponse.java | 1 - .../ru/gravit/launchserver/console/ConsoleMain.java | 2 -- .../console/RemoteJLineCommandHandler.java | 1 - .../launchserver/console/RemoteStdCommandHandler.java | 2 -- .../main/java/ru/gravit/launcher/LauncherEngine.java | 3 --- .../ru/gravit/launcher/client/ClientLauncher.java | 2 -- .../main/java/ru/gravit/launcher/LauncherConfig.java | 1 - .../java/ru/gravit/utils/command/CommandHandler.java | 2 -- modules | 2 +- 19 files changed, 2 insertions(+), 46 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/protect/ProtectHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/protect/ProtectHandler.java index 9145df79..5335643b 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/protect/ProtectHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/protect/ProtectHandler.java @@ -1,13 +1,10 @@ package ru.gravit.launchserver.auth.protect; -import ru.gravit.launchserver.auth.AuthException; -import ru.gravit.launchserver.auth.handler.AuthHandler; import ru.gravit.launchserver.response.auth.AuthResponse; import ru.gravit.utils.helper.VerifyHelper; import java.util.Map; import java.util.Objects; -import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; public abstract class ProtectHandler { diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java index f5d53b06..2a9572b3 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/provider/AuthProvider.java @@ -1,8 +1,6 @@ package ru.gravit.launchserver.auth.provider; -import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.auth.AuthException; -import ru.gravit.launchserver.auth.handler.AuthHandler; import ru.gravit.utils.helper.VerifyHelper; import java.io.IOException; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java index 22817021..cd640f2a 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/Command.java @@ -1,10 +1,6 @@ package ru.gravit.launchserver.command; import ru.gravit.launchserver.LaunchServer; -import ru.gravit.utils.command.CommandException; -import ru.gravit.utils.helper.VerifyHelper; - -import java.util.UUID; public abstract class Command extends ru.gravit.utils.command.Command { diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/auth/AuthCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/auth/AuthCommand.java index 124893cd..438191c9 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/auth/AuthCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/auth/AuthCommand.java @@ -34,8 +34,6 @@ public void invoke(String... args) throws Exception { String login = args[0]; String password = args[1]; - int auth_id = 0; - if (args.length >= 3) auth_id = Integer.valueOf(args[3]); // Authenticate AuthProvider provider = pair.provider; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java index 6bfb32ca..fe387086 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/handler/CommandHandler.java @@ -1,8 +1,6 @@ package ru.gravit.launchserver.command.handler; import ru.gravit.launchserver.LaunchServer; -import ru.gravit.launchserver.command.Command; -import ru.gravit.utils.command.CommandException; import ru.gravit.launchserver.command.auth.*; import ru.gravit.launchserver.command.basic.*; import ru.gravit.launchserver.command.dump.DumpEntryCacheCommand; @@ -13,15 +11,6 @@ import ru.gravit.launchserver.command.modules.LoadModuleCommand; import ru.gravit.launchserver.command.modules.ModulesCommand; import ru.gravit.launchserver.command.service.*; -import ru.gravit.utils.helper.CommonHelper; -import ru.gravit.utils.helper.LogHelper; -import ru.gravit.utils.helper.VerifyHelper; - -import java.io.IOException; -import java.time.Duration; -import java.time.Instant; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; public abstract class CommandHandler extends ru.gravit.utils.command.CommandHandler { public static void registerCommands(ru.gravit.utils.command.CommandHandler handler) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java index c442c1fb..848fe1d0 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/GetModulusCommand.java @@ -1,6 +1,5 @@ package ru.gravit.launchserver.command.service; - -import io.netty.handler.codec.base64.Base64; + import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.command.Command; import ru.gravit.utils.helper.LogHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/components/AuthLimiterComponent.java b/LaunchServer/src/main/java/ru/gravit/launchserver/components/AuthLimiterComponent.java index 0d8f18c5..2d357355 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/components/AuthLimiterComponent.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/components/AuthLimiterComponent.java @@ -9,20 +9,16 @@ import ru.gravit.launchserver.socket.Client; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.List; public class AuthLimiterComponent extends Component implements NeedGarbageCollection { - private transient LaunchServer server; @Override public void preInit(LaunchServer launchServer) { - } @Override public void init(LaunchServer launchServer) { - server = launchServer; launchServer.authHookManager.registerPreHook(this::preAuthHook); } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/config/ProtectHandlerAdapter.java b/LaunchServer/src/main/java/ru/gravit/launchserver/config/ProtectHandlerAdapter.java index 6e6fcd19..b342a14f 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/config/ProtectHandlerAdapter.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/config/ProtectHandlerAdapter.java @@ -1,7 +1,6 @@ package ru.gravit.launchserver.config; import com.google.gson.*; -import ru.gravit.launchserver.auth.handler.AuthHandler; import ru.gravit.launchserver.auth.protect.ProtectHandler; import ru.gravit.utils.helper.LogHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/hook/AuthHookManager.java b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/hook/AuthHookManager.java index 2f3a4ed2..bb5ec1b0 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/hook/AuthHookManager.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/hook/AuthHookManager.java @@ -1,6 +1,5 @@ package ru.gravit.launchserver.manangers.hook; -import ru.gravit.launcher.request.RequestException; import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.response.auth.AuthResponse; import ru.gravit.launchserver.socket.Client; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/profile/ProfileByUsernameResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/profile/ProfileByUsernameResponse.java index d09468b2..1016601b 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/profile/ProfileByUsernameResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/profile/ProfileByUsernameResponse.java @@ -5,7 +5,6 @@ import ru.gravit.launcher.serialize.SerializeLimits; import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.auth.AuthProviderPair; -import ru.gravit.launchserver.auth.handler.AuthHandler; import ru.gravit.launchserver.response.Response; import ru.gravit.launchserver.socket.Client; import ru.gravit.utils.helper.VerifyHelper; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java index d94bef47..42d99354 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/socket/websocket/json/auth/JoinServerResponse.java @@ -3,7 +3,6 @@ import io.netty.channel.ChannelHandlerContext; import ru.gravit.launcher.events.request.ErrorRequestEvent; import ru.gravit.launcher.events.request.JoinServerRequestEvent; -import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.websocket.WebSocketService; diff --git a/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/ConsoleMain.java b/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/ConsoleMain.java index 652e89e3..1ef58115 100644 --- a/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/ConsoleMain.java +++ b/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/ConsoleMain.java @@ -2,8 +2,6 @@ import ru.gravit.launcher.server.ServerWrapper; import ru.gravit.utils.command.CommandHandler; -import ru.gravit.utils.command.JLineCommandHandler; -import ru.gravit.utils.command.StdCommandHandler; import ru.gravit.utils.helper.LogHelper; import java.io.IOException; diff --git a/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteJLineCommandHandler.java b/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteJLineCommandHandler.java index bfdb634f..f3ff23b1 100644 --- a/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteJLineCommandHandler.java +++ b/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteJLineCommandHandler.java @@ -1,7 +1,6 @@ package ru.gravit.launchserver.console; import ru.gravit.launcher.request.admin.ExecCommandRequest; -import ru.gravit.utils.command.Command; import ru.gravit.utils.command.JLineCommandHandler; import ru.gravit.utils.helper.LogHelper; diff --git a/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteStdCommandHandler.java b/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteStdCommandHandler.java index b5255d66..8be4c4b7 100644 --- a/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteStdCommandHandler.java +++ b/LaunchServerConsole/src/main/java/ru/gravit/launchserver/console/RemoteStdCommandHandler.java @@ -1,8 +1,6 @@ package ru.gravit.launchserver.console; import ru.gravit.launcher.request.admin.ExecCommandRequest; -import ru.gravit.utils.command.Command; -import ru.gravit.utils.command.CommandHandler; import ru.gravit.utils.command.StdCommandHandler; import ru.gravit.utils.helper.LogHelper; diff --git a/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java b/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java index acb552ce..6d0c8f9c 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java +++ b/Launcher/src/main/java/ru/gravit/launcher/LauncherEngine.java @@ -4,7 +4,6 @@ import ru.gravit.launcher.client.ClientModuleManager; import ru.gravit.launcher.client.DirBridge; import ru.gravit.launcher.client.FunctionalBridge; -import ru.gravit.launcher.client.LauncherSettings; import ru.gravit.launcher.guard.LauncherGuardManager; import ru.gravit.launcher.gui.JSRuntimeProvider; import ru.gravit.launcher.gui.RuntimeProvider; @@ -13,8 +12,6 @@ import ru.gravit.utils.helper.JVMHelper; import ru.gravit.utils.helper.LogHelper; -import java.time.Duration; -import java.time.Instant; import java.util.Objects; import java.util.concurrent.atomic.AtomicBoolean; diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index 79455c5e..658f9516 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -11,7 +11,6 @@ import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.request.Request; -import ru.gravit.launcher.request.update.LegacyLauncherRequest; import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.stream.StreamObject; @@ -34,7 +33,6 @@ import java.nio.file.SimpleFileVisitor; import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.PosixFilePermission; -import java.security.interfaces.RSAPublicKey; import java.util.*; public final class ClientLauncher { diff --git a/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java b/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java index 82adbf6a..c3bbaf35 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/LauncherConfig.java @@ -3,7 +3,6 @@ import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.stream.StreamObject; -import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.utils.helper.VerifyHelper; diff --git a/libLauncher/src/main/java/ru/gravit/utils/command/CommandHandler.java b/libLauncher/src/main/java/ru/gravit/utils/command/CommandHandler.java index 18e31149..4076888f 100644 --- a/libLauncher/src/main/java/ru/gravit/utils/command/CommandHandler.java +++ b/libLauncher/src/main/java/ru/gravit/utils/command/CommandHandler.java @@ -5,8 +5,6 @@ import ru.gravit.utils.helper.VerifyHelper; import java.io.IOException; -import java.time.Duration; -import java.time.Instant; import java.util.Arrays; import java.util.Collections; import java.util.Map; diff --git a/modules b/modules index c01e4547..043b9ac4 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit c01e45473c72484b8b83235935f96f38ec9cca0d +Subproject commit 043b9ac4ffbca9a7378f22d7feeb4829e630a6c3