NullPointerException on SonarLintImages.getIssueImage

  • Operating system: windows 10

  • SonarLint plugin version: 7.5.0.54140:

  • Programming language you’re coding in: java

  • Is connected mode used:

    • Connected to SonarQube enterprise: 8.9.10

And a thorough description of the problem / question:
With Eclipse 4.25 and java 17, I have this error when I click on the view “Sonarlint on the fly” :

!ENTRY org.eclipse.jface 4 2 2022-11-19 17:55:46.883
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException: Cannot invoke "String.toLowerCase(java.util.Locale)" because "type" is null
	at org.sonarlint.eclipse.ui.internal.SonarLintImages.getIssueImage(SonarLintImages.java:97)
	at org.sonarlint.eclipse.ui.internal.views.issues.IssueDescriptionField.getImage(IssueDescriptionField.java:117)
	at org.sonarlint.eclipse.ui.internal.views.issues.IssueDescriptionField.update(IssueDescriptionField.java:126)
	at org.eclipse.ui.internal.views.markers.MarkerColumnLabelProvider.update(MarkerColumnLabelProvider.java:57)
...

I saw on github that the getIssueImage method no longer accepts the type parameter to be null, but the IssueDescriptionField class still calls the getIssueImage method passing null for this parameter. I think there is a bug here.

Thank You.
Julien

Hi @Ricetrac

Can you confirm you are using some “groupBy” in the SonarLint issues view?

Thanks

Hi @Julien_HENRY ,

Yes, I use the “group by severity”, and I noticed that the menus were no longer displayed for the “Sonarlint on the fly” view, I can no longer change this setting.

Thank You.
Julien

I have created a ticket:
https://sonarsource.atlassian.net/browse/SLE-577

I was able to reproduce, except that on my side I am able to revert to “Group By” → “None”:

Thanks for the feedback!