SonarQube gradle plugin v6 producing StackOverflowError

Hi Misagh,

Thank you for reporting this issue!
We have identified the problem and are working on a fix.

In the meantime, to prevent the crash, you have the option to exclude the file that triggers the issue.
For your project, it should be sufficient to exclude the file
support/cas-server-support-gcp-logging/src/main/java/org/apereo/cas/logging/GoogleCloudAppender.java.

I.e. in your build.gradle file, you would have to adapt the sonar section as follows:

sonar {
  // ...
  properties {
    // ...

    property "sonar.exclusions", "support/cas-server-support-gcp-logging/src/main/java/org/apereo/cas/logging/GoogleCloudAppender.java"
  }
}

Alternatively, if you would like to make sure that the issue will not arise on any new files, you also have the option to completely disable the advanced bug detection analyzer until we release the fix.
You can do this with the following property configuration:

sonar {
  // ...
  properties {
    // ...

    property "sonar.internal.analysis.dbd", false
  }
}

If you are curious about the cause of the crash:
It is related to the use of Lombok, specifically lombok.val. In specific cases, lombok.val is accidentally modeled as a type that is a sub-type of itself.
This then leads to an infinite recursion.

2 Likes