Error in SonarLint for IntelliJ part 2

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2023.1.2
  • SonarLint: 8.3.0.71062
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:359)
	at java.base/java.util.ArrayList.get(ArrayList.java:427)
	at o.sl.ij.editor.EditorDecorator.highlight(EditorDecorator.kt:86)
	at o.sl.ij.ui.vulnerabilities.TaintVulnerabilitiesPanel.updateRulePanelContent(TaintVulnerabilitiesPanel.kt:241)
	at o.sl.ij.ui.vulnerabilities.TaintVulnerabilitiesPanel.TREE_SELECTION_LISTENER$lambda$3(TaintVulnerabilitiesPanel.kt:247)
	at java.desktop/javax.swing.JTree.fireValueChanged(JTree.java:3021)
	at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3522)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:650)
	at c.ij.ui.treeStructure.Tree$MySelectionModel.fireValueChanged(Tree.java:656)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1120)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:306)
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:200)
	at java.desktop/javax.swing.JTree.setSelectionPath(JTree.java:1710)

Hi @I.Naveen_Krishnan,

Thanks for your report!

Could you please provide the following information so we can have more context:

  • Are you connected to SonarQube or SonarCloud, and with which version?
  • Could you share the code that triggers this error?

In the meantime, if that’s still an issue and if you are in connected mode, you can try to update the local storage in Settings β†’ Tools β†’ SonarLint β†’ Project Settings β†’ Update local storage, and see if it helps.

2 Likes