We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36d77da commit 3727aedCopy full SHA for 3727aed
agent/agent/src/main/java/com/microsoft/applicationinsights/agent/StartupProfiler.java
@@ -103,6 +103,12 @@ private void captureThreadDump() {
103
threadBean.getAllThreadIds(), threadBean.isObjectMonitorUsageSupported(), false);
104
long currentThreadId = Thread.currentThread().getId();
105
for (ThreadInfo threadInfo : threadInfos) {
106
+ // If a thread of a given ID is not alive or does not exist, the corresponding element in
107
+ // the returned array will contain null
108
+ if (threadInfo == null) {
109
+ continue;
110
+ }
111
+
112
if (threadInfo.getThreadId() != currentThreadId) {
113
write(threadInfo);
114
}
0 commit comments