[ANY] Небольшой рефакторинг (Organize imports).

This commit is contained in:
zaxar163 2019-03-23 10:44:22 +03:00
parent c75addd930
commit b36a623e69
No known key found for this signature in database
GPG key ID: E3B309DD3852DE06
19 changed files with 2 additions and 46 deletions

View file

@ -1,13 +1,10 @@
package ru.gravit.launchserver.auth.protect; 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.launchserver.response.auth.AuthResponse;
import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.utils.helper.VerifyHelper;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
public abstract class ProtectHandler { public abstract class ProtectHandler {

View file

@ -1,8 +1,6 @@
package ru.gravit.launchserver.auth.provider; package ru.gravit.launchserver.auth.provider;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.launchserver.auth.handler.AuthHandler;
import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.utils.helper.VerifyHelper;
import java.io.IOException; import java.io.IOException;

View file

@ -1,10 +1,6 @@
package ru.gravit.launchserver.command; package ru.gravit.launchserver.command;
import ru.gravit.launchserver.LaunchServer; 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 { public abstract class Command extends ru.gravit.utils.command.Command {

View file

@ -34,8 +34,6 @@ public void invoke(String... args) throws Exception {
String login = args[0]; String login = args[0];
String password = args[1]; String password = args[1];
int auth_id = 0;
if (args.length >= 3) auth_id = Integer.valueOf(args[3]);
// Authenticate // Authenticate
AuthProvider provider = pair.provider; AuthProvider provider = pair.provider;

View file

@ -1,8 +1,6 @@
package ru.gravit.launchserver.command.handler; package ru.gravit.launchserver.command.handler;
import ru.gravit.launchserver.LaunchServer; 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.auth.*;
import ru.gravit.launchserver.command.basic.*; import ru.gravit.launchserver.command.basic.*;
import ru.gravit.launchserver.command.dump.DumpEntryCacheCommand; import ru.gravit.launchserver.command.dump.DumpEntryCacheCommand;
@ -13,15 +11,6 @@
import ru.gravit.launchserver.command.modules.LoadModuleCommand; import ru.gravit.launchserver.command.modules.LoadModuleCommand;
import ru.gravit.launchserver.command.modules.ModulesCommand; import ru.gravit.launchserver.command.modules.ModulesCommand;
import ru.gravit.launchserver.command.service.*; 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 abstract class CommandHandler extends ru.gravit.utils.command.CommandHandler {
public static void registerCommands(ru.gravit.utils.command.CommandHandler handler) public static void registerCommands(ru.gravit.utils.command.CommandHandler handler)

View file

@ -1,6 +1,5 @@
package ru.gravit.launchserver.command.service; package ru.gravit.launchserver.command.service;
import io.netty.handler.codec.base64.Base64;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.command.Command; import ru.gravit.launchserver.command.Command;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -9,20 +9,16 @@
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
public class AuthLimiterComponent extends Component implements NeedGarbageCollection { public class AuthLimiterComponent extends Component implements NeedGarbageCollection {
private transient LaunchServer server;
@Override @Override
public void preInit(LaunchServer launchServer) { public void preInit(LaunchServer launchServer) {
} }
@Override @Override
public void init(LaunchServer launchServer) { public void init(LaunchServer launchServer) {
server = launchServer;
launchServer.authHookManager.registerPreHook(this::preAuthHook); launchServer.authHookManager.registerPreHook(this::preAuthHook);
} }

View file

@ -1,7 +1,6 @@
package ru.gravit.launchserver.config; package ru.gravit.launchserver.config;
import com.google.gson.*; import com.google.gson.*;
import ru.gravit.launchserver.auth.handler.AuthHandler;
import ru.gravit.launchserver.auth.protect.ProtectHandler; import ru.gravit.launchserver.auth.protect.ProtectHandler;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -1,6 +1,5 @@
package ru.gravit.launchserver.manangers.hook; package ru.gravit.launchserver.manangers.hook;
import ru.gravit.launcher.request.RequestException;
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.launchserver.response.auth.AuthResponse; import ru.gravit.launchserver.response.auth.AuthResponse;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;

View file

@ -5,7 +5,6 @@
import ru.gravit.launcher.serialize.SerializeLimits; import ru.gravit.launcher.serialize.SerializeLimits;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthProviderPair; import ru.gravit.launchserver.auth.AuthProviderPair;
import ru.gravit.launchserver.auth.handler.AuthHandler;
import ru.gravit.launchserver.response.Response; import ru.gravit.launchserver.response.Response;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.utils.helper.VerifyHelper;

View file

@ -3,7 +3,6 @@
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import ru.gravit.launcher.events.request.ErrorRequestEvent; import ru.gravit.launcher.events.request.ErrorRequestEvent;
import ru.gravit.launcher.events.request.JoinServerRequestEvent; import ru.gravit.launcher.events.request.JoinServerRequestEvent;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.AuthException; import ru.gravit.launchserver.auth.AuthException;
import ru.gravit.launchserver.socket.Client; import ru.gravit.launchserver.socket.Client;
import ru.gravit.launchserver.socket.websocket.WebSocketService; import ru.gravit.launchserver.socket.websocket.WebSocketService;

View file

@ -2,8 +2,6 @@
import ru.gravit.launcher.server.ServerWrapper; import ru.gravit.launcher.server.ServerWrapper;
import ru.gravit.utils.command.CommandHandler; 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 ru.gravit.utils.helper.LogHelper;
import java.io.IOException; import java.io.IOException;

View file

@ -1,7 +1,6 @@
package ru.gravit.launchserver.console; package ru.gravit.launchserver.console;
import ru.gravit.launcher.request.admin.ExecCommandRequest; import ru.gravit.launcher.request.admin.ExecCommandRequest;
import ru.gravit.utils.command.Command;
import ru.gravit.utils.command.JLineCommandHandler; import ru.gravit.utils.command.JLineCommandHandler;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -1,8 +1,6 @@
package ru.gravit.launchserver.console; package ru.gravit.launchserver.console;
import ru.gravit.launcher.request.admin.ExecCommandRequest; 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.command.StdCommandHandler;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -4,7 +4,6 @@
import ru.gravit.launcher.client.ClientModuleManager; import ru.gravit.launcher.client.ClientModuleManager;
import ru.gravit.launcher.client.DirBridge; import ru.gravit.launcher.client.DirBridge;
import ru.gravit.launcher.client.FunctionalBridge; import ru.gravit.launcher.client.FunctionalBridge;
import ru.gravit.launcher.client.LauncherSettings;
import ru.gravit.launcher.guard.LauncherGuardManager; import ru.gravit.launcher.guard.LauncherGuardManager;
import ru.gravit.launcher.gui.JSRuntimeProvider; import ru.gravit.launcher.gui.JSRuntimeProvider;
import ru.gravit.launcher.gui.RuntimeProvider; import ru.gravit.launcher.gui.RuntimeProvider;
@ -13,8 +12,6 @@
import ru.gravit.utils.helper.JVMHelper; import ru.gravit.utils.helper.JVMHelper;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;
import java.time.Duration;
import java.time.Instant;
import java.util.Objects; import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;

View file

@ -11,7 +11,6 @@
import ru.gravit.launcher.profiles.ClientProfile; import ru.gravit.launcher.profiles.ClientProfile;
import ru.gravit.launcher.profiles.PlayerProfile; import ru.gravit.launcher.profiles.PlayerProfile;
import ru.gravit.launcher.request.Request; import ru.gravit.launcher.request.Request;
import ru.gravit.launcher.request.update.LegacyLauncherRequest;
import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.stream.StreamObject; import ru.gravit.launcher.serialize.stream.StreamObject;
@ -34,7 +33,6 @@
import java.nio.file.SimpleFileVisitor; import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.BasicFileAttributes;
import java.nio.file.attribute.PosixFilePermission; import java.nio.file.attribute.PosixFilePermission;
import java.security.interfaces.RSAPublicKey;
import java.util.*; import java.util.*;
public final class ClientLauncher { public final class ClientLauncher {

View file

@ -3,7 +3,6 @@
import ru.gravit.launcher.serialize.HInput; import ru.gravit.launcher.serialize.HInput;
import ru.gravit.launcher.serialize.HOutput; import ru.gravit.launcher.serialize.HOutput;
import ru.gravit.launcher.serialize.stream.StreamObject; import ru.gravit.launcher.serialize.stream.StreamObject;
import ru.gravit.utils.helper.LogHelper;
import ru.gravit.utils.helper.SecurityHelper; import ru.gravit.utils.helper.SecurityHelper;
import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.utils.helper.VerifyHelper;

View file

@ -5,8 +5,6 @@
import ru.gravit.utils.helper.VerifyHelper; import ru.gravit.utils.helper.VerifyHelper;
import java.io.IOException; import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Map; import java.util.Map;

@ -1 +1 @@
Subproject commit c01e45473c72484b8b83235935f96f38ec9cca0d Subproject commit 043b9ac4ffbca9a7378f22d7feeb4829e630a6c3