NullPointerException in SonarLintEclipseRpcClient

Please provide

  • Operating system: Windows 11
  • SonarLint plugin version: 10.2.0.81875
  • Programming language you’re coding in: N/A
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): SonarQube 8.9.9

And a thorough description of the problem / question:

Just upgraded to this version. Seeing this on the SonarLint Console:

Using self-managed Java installation
Starting SonarLint for Eclipse 10.2.0.81875
Using JRE from C:\Program Files\Eclipse Adoptium\jdk-17.0.5.8-hotspot
SonarLint backend started, instance=org.sonarsource.sonarlint.core.rpc.impl.SonarLintRpcServerImpl@17f62e33
Started embedded server on port 64120
Can't open directory channel. Log directory fsync won't be performed.
Error when handling a notification
java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "java.util.Map.get(Object)" is null
at org.sonarlint.eclipse.ui.internal.backend.SonarLintEclipseRpcClient.didChangeTaintVulnerabilities(SonarLintEclipseRpcClient.java:336)
at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$didChangeTaintVulnerabilities$30(SonarLintRpcClientImpl.java:338)
at org.sonarsource.sonarlint.core.rpc.client.SonarLintRpcClientImpl.lambda$notify$4(SonarLintRpcClientImpl.java:145)
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:840)
1 Like

Hi @gnl42,

Thanks for reaching out. This is a bug, so I’ve created THIS ticket and it will be fixed in the next release.

The cause of that issue was that Taint Vulnerabilities were found on SonarQube, and SonarLint wanted to show them in the editor - but no file with such a Taint Vulnerability was opened, but we assumed there was.

Best,
Tobias

NOTE: in my case it’s still reproduced, SonarLint is connected to SonarCloud and the exception is still in the console.

Hi @lrozenblyum,

the release has not yet happened, so the issue was not fixed.

Best,
Tobias

1 Like

Hi @lrozenblyum, Hi @gnl42,

the newest version of SonarLint for Eclipse 10.3.0.82013 was just released, there will be a Community announcement following soon.

This issue was fixed in that release.

Best,
Tobias

1 Like

Thanks, after the update of the plig-in the issue is not reproduced at my side anymore.