Error in SonarLint for IntelliJ part 2


  • Java: JetBrains s.r.o. 17.0.6
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2023.1.2
  • SonarLint:
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(
	at java.base/jdk.internal.util.Preconditions.checkIndex(
	at java.base/java.util.Objects.checkIndex(
	at java.base/java.util.ArrayList.get(
	at java.desktop/javax.swing.JTree.fireValueChanged(
	at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(
	at c.ij.ui.treeStructure.Tree$MySelectionModel.fireValueChanged(
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(
	at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(
	at java.desktop/javax.swing.JTree.setSelectionPath(

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.