Error in SonarLint for CLion

Environment:

  • Java: JetBrains s.r.o. 11.0.11
  • OS: Mac OS X x86_64
  • IDE: CLion 2021.2.1
  • SonarLint: 5.2.0.35150
java.lang.NullPointerException
	at o.sl.ij.config.global.SonarLintGlobalConfigurable.apply(SonarLintGlobalConfigurable.java:85)
	at c.ij.oa.options.ex.ConfigurableWrapper.apply(ConfigurableWrapper.java:179)
	at c.ij.oa.options.newEditor.ConfigurableEditor.apply(ConfigurableEditor.java:316)
	at c.ij.oa.options.newEditor.SettingsEditor$5.apply(SettingsEditor.java:207)
	at c.ij.oa.options.newEditor.ConfigurableEditor$2.actionPerformed(ConfigurableEditor.java:62)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6652)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
	at java.desktop/java.awt.Component.processEvent(Component.java:6417)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)

Hello, welcome to the community! And thank you for reporting this.

Could you please provide additional info, e.g what were you doing when this exception was thrown?

It looks like this happened when you clicked on the “Apply” or “OK” button in the CLion settings, but unfortunately I was not able to reproduce this behavior - though indeed, reading through the source code, I can see how a lifecycle issue with the configuration dialog could end up with a NPE.