Error in SonarLint for IntelliJ during startup

During start this error occurs…


  • Java: JetBrains s.r.o. 11.0.13
  • OS: Mac OS X x86_64
  • IDE: IntelliJ IDEA 2021.3.1
  • SonarLint:
java.lang.ClassCastException: class java.lang.String cannot be cast to class javax.swing.Icon (java.lang.String is in module java.base of loader 'bootstrap'; javax.swing.Icon is in module java.desktop of loader 'bootstrap')
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.installDefaults(
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.installUI(
	at java.desktop/
	at java.desktop/javax.swing.JComponent.setUI(
	at java.desktop/javax.swing.JTree.setUI(
	at c.ij.ui.treeStructure.Tree.setUI(
	at java.desktop/javax.swing.JTree.updateUI(
	at java.desktop/javax.swing.JTree.<init>(
	at c.ij.ui.treeStructure.Tree.<init>(
	at c.ij.oa.wm.impl.ToolWindowImpl.createContentIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:542)
	at c.ij.oa.wm.impl.ToolWindowImpl.getContentManager(ToolWindowImpl.kt:403)

Hi @ThomasMinor

I fail to see the reason why this happens. The error is in IntelliJ internals. Maybe this is a bug on their side, I have asked on their Slack channel. Are you using a custom theme? Can you try switching to a different one?

This is confirmed, this is a bug on IntelliJ side, when using custom theme:
They are mentioning as workaround to revert to default theme.

Uhh, just seen your reply, I’ll try the workaround you mentioned and report back!

Hello @ThomasMinor,

Any news on this ? Did the issue disappear ?