NullPointerException in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 17.0.8
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2023.2.1
  • SonarLint: 9.0.0.75308

*** exception class was changed or removed

  Exception thrown by subscriber method handleEvent(o.ss.sl.core.event.ConfigurationScopeRemovedEvent) on subscriber o.ss.sl.core.websocket.WebSocketService@473010b0 when dispatching event: o.ss.sl.core.event.ConfigurationScopeRemovedEvent@5417b7d5
  
  java.lang.NullPointerException: Cannot invoke "o.ss.sl.core.websocket.SonarCloudWebSocket.unsubscribe(String)" because "this.sonarCloudWebSocket" is null
at o.ss.sl.core.websocket.WebSocketService.forget(WebSocketService.java:260)
at o.ss.sl.core.websocket.WebSocketService.handleEvent(WebSocketService.java:101)
at jdk.internal.reflect.GeneratedMethodAccessor1644.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:85)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:142)
at com.google.common.eventbus.Subscriber.lambda$dispatchEvent$0(Subscriber.java:71)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)

Hello @nicholasfechner,

Thanks for reporting here. Could you provide more details about when this error occurred?

Iā€™m not sure. The notification appeared in IntelliJs sidebar and the resulting dialog posted this.

Hi @nicholasfechner ,

I managed to reproduce the issue and I fixed it.

The issue does not have any impact on the SonarLint functionality, so for future readers, you can simply ignore the error.

The fix will be published in our next release planned at the end of this month.

Thanks again for the report

1 Like