Error in SonarLint for IntelliJ - Sonar is acting up again

Environment:

  • Java: JetBrains s.r.o. 17.0.9
  • OS: Mac OS X aarch64
  • IDE: IntelliJ IDEA 2023.2.5
  • SonarLint: 10.0.1.77000

*** exception class was changed or removed

  Exceptions occurred on invoking the intention 'SonarLint: Inline expression' on a copy of the file.
  
  java.lang.IndexOutOfBoundsException: Wrong startOffset: 1489; documentLength: 1477
at c.ij.oa.editor.impl.DocumentImpl.assertBounds(DocumentImpl.java:661)
at c.ij.oa.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:597)
at c.ij.oa.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:591)
at o.sl.ij.editor.ApplyQuickFixIntentionAction.invoke(ApplyQuickFixIntentionAction.kt:71)
at c.ij.codeInsight.intention.IntentionAction.generatePreview(IntentionAction.java:111)
at c.ij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.generatePreview(IntentionActionWithTextCaching.java:242)
at c.ij.codeInsight.intention.impl.preview.IntentionPreviewComputable.invokePreview$lambda$3$lambda$2$lambda$1(IntentionPreviewComputable.kt:124)
at c.ij.model.SideEffectGuard.computeWithAllowedSideEffects(SideEffectGuard.java:25)
at c.ij.model.SideEffectGuard.computeWithoutSideEffects(SideEffectGuard.java:18)
at c.ij.codeInsight.intention.impl.preview.IntentionPreviewComputable.invokePreview$lambda$3$lambda$2(IntentionPreviewComputable.kt:123)
at c.ij.psi.impl.source.PostprocessReformattingAspectImpl.lambda$postponeFormattingInside$2(PostprocessReformattingAspectImpl.java:140)
at c.ij.psi.impl.source.PostprocessReformattingAspectImpl.postponeFormattingInside(PostprocessReformattingAspectImpl.java:149)

Hey there.

The latest version of SonarLint for IntelliJ is v10.2.1 – can you try upgrading?