Error in SonarLint for IntelliJ with sonarqube

Environment:

  • Java: JetBrains s.r.o. 17.0.9
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2023.2.5
  • SonarLint: 10.2.1.77304
  • SonarQube: 8.9.9 (build 56886)
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
	at java.base/java.util.Objects.checkIndex(Objects.java:361)
	at java.base/java.util.ArrayList.get(ArrayList.java:427)
	at o.sl.ij.editor.EditorDecorator.highlight(EditorDecorator.kt:92)
	at o.sl.ij.ui.tree.TaintVulnerabilityTree.highlightInEditor(TaintVulnerabilityTree.kt:126)
	at o.sl.ij.ui.tree.TaintVulnerabilityTree.showInEditor(TaintVulnerabilityTree.kt:105)
	at o.sl.ij.ui.tree.TaintVulnerabilityTree._init_$lambda$2(TaintVulnerabilityTree.kt:93)
	at c.ij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.processDoubleClick(EditSourceOnDoubleClickHandler.kt:190)
	at c.ij.util.EditSourceOnDoubleClickHandler$TreeMouseListener.onDoubleClick(EditSourceOnDoubleClickHandler.kt:176)
	at c.ij.ui.DoubleClickListener.onClick(DoubleClickListener.java:30)
	at c.ij.ui.ClickListener$1.mouseReleased(ClickListener.java:58)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6657)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
	at c.ij.ui.treeStructure.Tree.processMouseEvent(Tree.java:437)

Hi,

Welcome to the community!

You’re in connected mode with SonarQube 8.9.9? You should be aware that your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.9 β†’ 9.9.3 β†’ 10.3 (last step optional)

But that’s not why you came here today. :smiley:

SonarLint for IntelliJ 10.3.0.77475 has just been released. Can you upgrade and see if this is still replicable? And if so, can you share the circumstance in which you see this error?

 
Thx,
Ann

1 Like

thank you. I will try following the guide and report back.

I upgraded both sonar plugin and intellij to the latest version, but I still get the same error.

Hi,

Are you on SonarQube 9.9.3 or 10.3?

 
Thx,
Ann

SonarQube has not been upgraded. Do I need to upgrade SonarQube?

Hi,

Yes, you should upgrade SonarQube as well.

 
Ann

I’ll try to upgrade it,
Thank you for your answer.