[FIX] Фикс трансфера агента

This commit is contained in:
Gravit 2019-06-28 15:01:18 +07:00
parent 9922479314
commit 94b2fb1424
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -62,8 +62,7 @@ public static void premain(String agentArgument, Instrumentation instrumentation
try { try {
proxyClass = Class.forName(proxyClassName); proxyClass = Class.forName(proxyClassName);
MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(proxyClass, "premain", MethodType.methodType(void.class, String.class, Instrumentation.class)); MethodHandle mainMethod = MethodHandles.publicLookup().findStatic(proxyClass, "premain", MethodType.methodType(void.class, String.class, Instrumentation.class));
Object[] args = {agentArgument, instrumentation}; mainMethod.invoke(agentArgument, instrumentation);
mainMethod.invoke(null, args);
} catch (Throwable e) { } catch (Throwable e) {
LogHelper.error(e); LogHelper.error(e);
} }