Uploaded image for project: 'SonarJava'
  1. SonarJava
  2. SONARJAVA-3790

Fix ClassCastException in S5411 (BoxedBooleanExpressionsCheck:158)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.15
    • Component/s: Rules
    • Labels:
      None

      Description

      ERROR: Unable to run check class org.sonar.java.checks.BoxedBooleanExpressionsCheck - S5411 on file 'jdk/src/java.desktop/share/classes/java/awt/Component.java', To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
      java.lang.ClassCastException: class org.sonar.java.model.statement.IfStatementTreeImpl cannot be cast to class org.sonar.plugins.java.api.tree.ExpressionTree (org.sonar.java.model.statement.IfStatementTreeImpl and org.sonar.plugins.java.api.tree.ExpressionTree are in unnamed module of loader org.sonar.classloader.ClassRealm @6e33c391)
      	at org.sonar.java.checks.BoxedBooleanExpressionsCheck.isFirstUsageANullCheck(BoxedBooleanExpressionsCheck.java:158)
      	at org.sonar.java.checks.BoxedBooleanExpressionsCheck.isSafeBooleanExpression(BoxedBooleanExpressionsCheck.java:128)
      	at org.sonar.java.checks.BoxedBooleanExpressionsCheck.visitIfStatement(BoxedBooleanExpressionsCheck.java:105)
      	at org.sonar.java.model.statement.IfStatementTreeImpl.accept(IfStatementTreeImpl.java:123)
      

       See peach analyze.log of jdk9

        Attachments

          Activity

            People

            • Assignee:
              alban.auzeill Alban Auzeill
              Reporter:
              alban.auzeill Alban Auzeill
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: