Error in SonarLint for IntelliJ

Environment:

  • Java: JetBrains s.r.o. 17.0.10
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2023.3.4
  • SonarLint: 10.4.0.77904

Unable to run check class org.sonar.java.checks.NullShouldNotBeUsedWithOptionalCheck - S2789 on file ‘[uri=file:///C:/Desarrollo/intvoz/intvoz-commons/src/main/java/com/dekra/intvoz/commons/historic/services/HistoricServiceImpl.java]’, To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/

java.lang.NullPointerException: Cannot invoke "o.s.pl.java.api.tree.ExpressionTree.is(o.s.pl.java.api.tree.Tree$Kind[])" because "expression" is null
	at org.sonar.java.checks.NullShouldNotBeUsedWithOptionalCheck.isNull(NullShouldNotBeUsedWithOptionalCheck.java:166)
	at org.sonar.java.checks.NullShouldNotBeUsedWithOptionalCheck$ReturnNullVisitor.checkNull(NullShouldNotBeUsedWithOptionalCheck.java:127)
	at org.sonar.java.checks.NullShouldNotBeUsedWithOptionalCheck$ReturnNullVisitor.visitReturnStatement(NullShouldNotBeUsedWithOptionalCheck.java:111)
	at org.sonar.java.model.statement.ReturnStatementTreeImpl.accept(ReturnStatementTreeImpl.java:70)
	at o.s.pl.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:40)
	at o.s.pl.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:34)
	at o.s.pl.java.api.tree.BaseTreeVisitor.visitBlock(BaseTreeVisitor.java:87)
	at org.sonar.java.model.statement.BlockTreeImpl.accept(BlockTreeImpl.java:75)
	at o.s.pl.java.api.tree.BaseTreeVisitor.scan(BaseTreeVisitor.java:40)
	at o.s.pl.java.api.tree.BaseTreeVisitor.visitMethod(BaseTreeVisitor.java:82)

Hey there.

Would you be able to post the contents of this file?