[FIX] Radon работает. Агент тоже работает.

This commit is contained in:
Zaxar163 2019-05-03 10:06:11 +03:00
parent 4615624431
commit f49d007f9f
4 changed files with 8 additions and 6 deletions

View file

@ -721,7 +721,8 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException {
newConfig.threadCoreCount = 0; // on your own newConfig.threadCoreCount = 0; // on your own
newConfig.threadCount = JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors(); newConfig.threadCount = JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() >= 4 ? JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors() / 2 : JVMHelper.OPERATING_SYSTEM_MXBEAN.getAvailableProcessors();
newConfig.enabledRadon = false; newConfig.enabledRadon = true;
newConfig.genMappings = true;
newConfig.enabledProGuard = true; newConfig.enabledProGuard = true;
newConfig.stripLineNumbers = true; newConfig.stripLineNumbers = true;
newConfig.deleteTempFiles = true; newConfig.deleteTempFiles = true;
@ -745,12 +746,12 @@ private void generateConfigIfNotExists(boolean testEnv) throws IOException {
System.out.println("LaunchServer projectName: "); System.out.println("LaunchServer projectName: ");
newConfig.setProjectName(commandHandler.readLine()); newConfig.setProjectName(commandHandler.readLine());
} }
if(address == null) if(address == null || address.isEmpty())
{ {
LogHelper.error("Address null. Using localhost"); LogHelper.error("Address null. Using localhost");
address = "localhost"; address = "localhost";
} }
if(newConfig.projectName == null) if(newConfig.projectName == null || newConfig.projectName.isEmpty())
{ {
LogHelper.error("ProjectName null. Using MineCraft"); LogHelper.error("ProjectName null. Using MineCraft");
newConfig.projectName = "MineCraft"; newConfig.projectName = "MineCraft";

View file

@ -12,7 +12,6 @@
import io.netty.handler.codec.http.HttpServerCodec; import io.netty.handler.codec.http.HttpServerCodec;
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler; import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler; import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler; import io.netty.handler.logging.LoggingHandler;
import ru.gravit.launchserver.LaunchServer; import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.websocket.fileserver.FileServerHandler; import ru.gravit.launchserver.websocket.fileserver.FileServerHandler;

View file

@ -15,6 +15,7 @@
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.lang.instrument.Instrumentation; import java.lang.instrument.Instrumentation;
import java.lang.management.ManagementFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.jar.JarFile; import java.util.jar.JarFile;
@ -53,7 +54,8 @@ public static void premain(String agentArgument, Instrumentation instrumentation
} }
} }
try { try {
//replaceClasses(pb, rt); if (ManagementFactory.getOperatingSystemMXBean().getName().startsWith("Windows")) replaceClasses(pb, rt);
else replaceClasses(false, false);
} catch (Error e) { } catch (Error e) {
NativeJVMHalt.haltA(294); NativeJVMHalt.haltA(294);
throw e; throw e;

2
Radon

@ -1 +1 @@
Subproject commit 07581407e7b214b7dff8a256247dde62bba1697d Subproject commit 6410af8044e7346e06f546dc04636b631fa7584c