Skip to content

Commit

Permalink
[fix][test] Fix Thread.getThreadGroup().getName() NPE (apache#22070)
Browse files Browse the repository at this point in the history
  • Loading branch information
Technoboy- committed Feb 19, 2024
1 parent b375e86 commit 0b6bd70
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ private static boolean shouldSkipThread(Thread thread) {
return true;
}
// skip Testcontainers threads
if (thread.getThreadGroup() != null && "testcontainers".equals(thread.getThreadGroup().getName())) {
final ThreadGroup threadGroup = thread.getThreadGroup();
if (threadGroup != null && "testcontainers".equals(threadGroup.getName())) {
return true;
}
String threadName = thread.getName();
Expand Down

0 comments on commit 0b6bd70

Please sign in to comment.