Error (NPE) in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 17.0.11
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2024.1.6
  • SonarLint: 10.8.1.79205
java.lang.NullPointerException: Cannot read field "x" because "rowBounds" is null
	at c.ij.ui.treeStructure.treetable.TreeTableTree.setVisibleRow(TreeTableTree.java:98)
	at c.ij.ui.treeStructure.treetable.TreeTableCellRenderer.getTableCellRendererComponent(TreeTableCellRenderer.java:71)
	at java.desktop/javax.swing.JTable.prepareRenderer(JTable.java:5812)
	at c.ij.ui.table.JBTable.prepareRenderer(JBTable.java:732)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2210)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2112)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1908)
	at java.desktop/javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
	at java.desktop/javax.swing.JComponent.paintComponent(JComponent.java:845)
	at c.ij.ui.table.JBTable.paintComponent(JBTable.java:429)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1115)
	at c.ij.ui.table.JBTable.paint(JBTable.java:565)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)
	at java.desktop/javax.swing.JViewport.paint(JViewport.java:736)
	at c.ij.ui.components.JBViewport.paint(JBViewport.java:235)
	at java.desktop/javax.swing.JComponent.paintChildren(JComponent.java:955)
	at java.desktop/javax.swing.JComponent.paint(JComponent.java:1124)

Hi @mauritz-lovgren, thank you for your report!

The stack trace appears to be truncated, and I can’t see the link with SonarLint. If you still have the issue, or if it ever happens again, could you please share it fully?

Also, do not hesitate to share if you have more information on how this happened or if it is reproducible.