IDEA Code Refractor

This commit is contained in:
Gravit 2018-12-20 22:52:09 +07:00
parent 87669d1d46
commit d2916d180d
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
6 changed files with 7 additions and 6 deletions

View file

@ -94,7 +94,6 @@ public void check0(HWID hwid, String username) throws HWIDException {
} }
if (needWrite) { if (needWrite) {
writeHWID(hwid, username, c); writeHWID(hwid, username, c);
return;
} }
} }
} catch (SQLException e) { } catch (SQLException e) {

View file

@ -14,17 +14,17 @@
public class BuildHookManager { public class BuildHookManager {
@FunctionalInterface @FunctionalInterface
public static interface ZipBuildHook { public interface ZipBuildHook {
void build(ZipOutputStream context); void build(ZipOutputStream context);
} }
@FunctionalInterface @FunctionalInterface
public static interface BuildHook { public interface BuildHook {
void build(BuildContext context); void build(BuildContext context);
} }
@FunctionalInterface @FunctionalInterface
public static interface Transformer { public interface Transformer {
byte[] transform(byte[] input, String classname, JARLauncherBinary data); byte[] transform(byte[] input, String classname, JARLauncherBinary data);
} }

View file

@ -12,7 +12,7 @@
public class NodeTransformer implements Transformer { public class NodeTransformer implements Transformer {
@FunctionalInterface @FunctionalInterface
public static interface ClassNodeTransformer { public interface ClassNodeTransformer {
void transform(ClassNode node, String classname, JARLauncherBinary data); void transform(ClassNode node, String classname, JARLauncherBinary data);
} }

View file

@ -49,7 +49,7 @@ public ServerSocketHandler(LaunchServer server, SessionManager sessionManager) {
this.server = server; this.server = server;
threadPool = new ThreadPoolExecutor(server.config.threadCoreCount, Integer.MAX_VALUE, threadPool = new ThreadPoolExecutor(server.config.threadCoreCount, Integer.MAX_VALUE,
server.config.threadCount, TimeUnit.SECONDS, server.config.threadCount, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(), new SynchronousQueue<>(),
THREAD_FACTORY); THREAD_FACTORY);
this.sessionManager = sessionManager; this.sessionManager = sessionManager;
} }

View file

@ -46,6 +46,7 @@ public static long getObjSize(Object obj) {
public static Boolean isAutoloadLibraries = Boolean.getBoolean(System.getProperty("serverwrapper,agentlibrariesload", "false")); public static Boolean isAutoloadLibraries = Boolean.getBoolean(System.getProperty("serverwrapper,agentlibrariesload", "false"));
public static Boolean isAgentProxy = Boolean.getBoolean(System.getProperty("serverwrapper,agentproxy", "false")); public static Boolean isAgentProxy = Boolean.getBoolean(System.getProperty("serverwrapper,agentproxy", "false"));
@SuppressWarnings("JavaLangInvokeHandleSignature")
public static void premain(String agentArgument, Instrumentation instrumentation) { public static void premain(String agentArgument, Instrumentation instrumentation) {
LogHelper.debug("Server Agent"); LogHelper.debug("Server Agent");
inst = instrumentation; inst = instrumentation;

View file

@ -82,6 +82,7 @@ public static boolean loopAuth(ServerWrapper wrapper, int count, int sleeptime)
return false; return false;
} }
@SuppressWarnings("ConfusingArgumentToVarargsMethod")
public static void main(String[] args) throws Throwable { public static void main(String[] args) throws Throwable {
ServerWrapper wrapper = new ServerWrapper(); ServerWrapper wrapper = new ServerWrapper();
LogHelper.printVersion("ServerWrapper"); LogHelper.printVersion("ServerWrapper");