diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java index bc9caf3a..575b2f81 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/binary/JARLauncherBinary.java @@ -162,7 +162,7 @@ public void build() throws IOException { String filename = e.getName(); output.putNextEntry(IOHelper.newZipEntry(e.getName())); if (filename.endsWith(".class")) { - CharSequence classname = filename.replace('/', '.').subSequence(0, + String classname = filename.replace('/', '.').substring(0, filename.length() - ".class".length()); byte[] bytes; try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(2048)) { @@ -231,7 +231,7 @@ private void stdBuild() throws IOException { continue; } if (filename.endsWith(".class")) { - CharSequence classname = filename.replace('/', '.').subSequence(0, + String classname = filename.replace('/', '.').substring(0, filename.length() - ".class".length()); byte[] bytes; try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(2048)) { diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java index e52d6a18..0a449d24 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/BuildHookManager.java @@ -25,7 +25,7 @@ public static interface BuildHook { @FunctionalInterface public static interface Transformer { - byte[] transform(byte[] input, CharSequence classname, JARLauncherBinary data); + byte[] transform(byte[] input, String classname, JARLauncherBinary data); } private boolean BUILDRUNTIME; @@ -95,13 +95,13 @@ public boolean buildRuntime() { return BUILDRUNTIME; } - public byte[] classTransform(byte[] clazz, CharSequence classname, JARLauncherBinary reader) { + public byte[] classTransform(byte[] clazz, String classname, JARLauncherBinary reader) { byte[] result = clazz; for (Transformer transformer : CLASS_TRANSFORMER) result = transformer.transform(result, classname, reader); return result; } - public byte[] proGuardClassTransform(byte[] clazz, CharSequence classname, JARLauncherBinary reader) { + public byte[] proGuardClassTransform(byte[] clazz, String classname, JARLauncherBinary reader) { byte[] result = clazz; for (Transformer transformer : POST_PROGUARD_HOOKS) result = transformer.transform(result, classname, reader); return result; diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java index 321a0b88..b0251c67 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/manangers/NodeTransformer.java @@ -14,7 +14,7 @@ public class NodeTransformer implements Transformer { @FunctionalInterface public static interface ClassNodeTransformer { - void transform(ClassNode node, CharSequence classname, JARLauncherBinary data); + void transform(ClassNode node, String classname, JARLauncherBinary data); } private final List transLst; @@ -28,7 +28,7 @@ public NodeTransformer() { } @Override - public byte[] transform(byte[] input, CharSequence classname, JARLauncherBinary data) { + public byte[] transform(byte[] input, String classname, JARLauncherBinary data) { ClassReader cr = new ClassReader(input); ClassNode cn = new ClassNode(); cr.accept(cn, ClassReader.EXPAND_FRAMES); diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/FunctionalBridge.java b/Launcher/src/main/java/ru/gravit/launcher/client/FunctionalBridge.java index 365a4414..70f1d288 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/FunctionalBridge.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/FunctionalBridge.java @@ -55,8 +55,9 @@ public static void makeJsonRequest(RequestInterface request, Runnable callback) { } + @LauncherAPI - public static void startTask(Task task) + public static void startTask(@SuppressWarnings("rawtypes") Task task) { try { worker.queue.put(task);