From cfc140d47c4288f8edbc20cd4b005bcf1adf24d5 Mon Sep 17 00:00:00 2001 From: Gravit Date: Mon, 17 Feb 2020 08:35:02 +0700 Subject: [PATCH] [FIX] binaryName fixes and optimize InjectClassAcceptor --- .../java/pro/gravit/launchserver/asm/InjectClassAcceptor.java | 4 ++-- .../pro/gravit/launchserver/config/LaunchServerConfig.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java index 66dcd9c8..af5a62be 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/asm/InjectClassAcceptor.java @@ -136,11 +136,11 @@ public void visit(final String name, final Object value) { }); serializers.put(Character.class, (Serializer) e -> { InsnList ret = new InsnList(); - ret.add(NodeUtils.push((int) e.charValue())); + ret.add(NodeUtils.push((int) e)); ret.add(new InsnNode(Opcodes.I2C)); return ret; }); - serializers.put(Enum.class, (Serializer) value -> NodeUtils.makeValueEnumGetter(value)); + serializers.put(Enum.class, (Serializer) NodeUtils::makeValueEnumGetter); } private static Serializer serializerClass(int opcode) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index c405d378..45077405 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -284,7 +284,6 @@ public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { a.displayName = "Default"; newConfig.auth.put("std", a); newConfig.protectHandler = new StdProtectHandler(); - if (env.equals(LaunchServer.LaunchServerEnv.TEST)) newConfig.binaryName = "Launcher"; newConfig.whitelistRejectString = "Вас нет в белом списке";