mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
[coroutines-debuuger] Fix CoroutinesDebugHelper#dumpCoroutinesInfoAsJsonAndReferences return null in case of an error
GitOrigin-RevId: d0a7ff5f6ea4932ca570044ec348aabd1bdb95d4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f282f68b1e
commit
78427051ef
@@ -146,10 +146,14 @@ public final class CoroutinesDebugHelper {
|
||||
|
||||
public static Object[] dumpCoroutinesInfoAsJsonAndReferences() throws ReflectiveOperationException {
|
||||
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
||||
Class<?> debugProbesImplClass = classLoader.loadClass("kotlinx.coroutines.debug.internal.DebugProbesImpl");
|
||||
Object debugProbesImplInstance = debugProbesImplClass.getField("INSTANCE").get(null);
|
||||
Object[] infos = (Object[])invoke(debugProbesImplInstance, "dumpCoroutinesInfoAsJsonAndReferences");
|
||||
return infos;
|
||||
try {
|
||||
Class<?> debugProbesImplClass = classLoader.loadClass("kotlinx.coroutines.debug.internal.DebugProbesImpl");
|
||||
Object debugProbesImplInstance = debugProbesImplClass.getField("INSTANCE").get(null);
|
||||
Object[] infos = (Object[])invoke(debugProbesImplInstance, "dumpCoroutinesInfoAsJsonAndReferences");
|
||||
return infos;
|
||||
} catch (Throwable e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user