NPE in IdeNotificationArea.setStatus() due to null myStatusBar during unit test completion

A few users of my plugin have started to see an odd behavior recently when unit tests are completing. Basically tests that did complete successfully are reported as ignored, and in the log you can see the following stack trace:

at com.intellij.notification.impl.IdeNotificationArea.updateStatus(
at com.intellij.notification.impl.IdeNotificationArea.lambda$null$0(
at com.intellij.openapi.application.TransactionGuardImpl$
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(
at com.intellij.openapi.application.impl.LaterInvocator$

which corresponds to the following line of code:


So obviously myStatusBar is null, though I've had users confirm that they have the IDE's status bar enabled. This seems to be happening in response to using ServiceMessageBuilder.testFinished() to tell the unit test framework that a test has completed successfully.

My plugin's code in this area hasn't changed in a long while, so I have to assume it's a change in behavior in more recent IDE builds.

Has anyone else seen this? Any idea what could be done to work around this issue?


Please sign in to leave a comment.