Running the sonar
Gradle task produces the following:
Unable to run check class org.sonar.java.checks.CollectorsToListCheck - S6204 on file 'support/cas-server-support-saml-idp-core/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/SamlRegisteredServiceMetadataAdaptor.java', To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
java.lang.IndexOutOfBoundsException: Index: 0
at java.base/java.util.Collections$EmptyList.get(Collections.java:4807)
at org.sonar.java.checks.CollectorsToListCheck.isInvariantTypeArgument(CollectorsToListCheck.java:110)
at org.sonar.java.checks.CollectorsToListCheck.onMethodInvocationFound(CollectorsToListCheck.java:95)
at org.sonar.java.checks.methods.AbstractMethodDetection.visitNode(AbstractMethodDetection.java:45)
at org.sonar.java.model.VisitorsBridge$IssuableSubscriptionVisitorsRunner.lambda$visit$6(VisitorsBridge.java:452)
at org.sonar.java.model.VisitorsBridge$IssuableSubscriptionVisitorsRunner.lambda$forEach$9(VisitorsBridge.java:468)
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Sonarqube Gradle plugin: 5.0.0.4638
with JDK 21
Gradle:
------------------------------------------------------------
Gradle 8.7
------------------------------------------------------------
Build time: 2024-03-22 15:52:46 UTC
Revision: 650af14d7653aa949fce5e886e685efc9cf97c10
Kotlin: 1.9.22
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 21 (Oracle Corporation 21+35-2513)
OS: Mac OS X 14.4.1 aarch64
Gradle task:
./gradlew sonar --build-cache --configure-on-demand --no-daemon -DskipAot=true --parallel \
-x javadoc -Dsonar.login="${SONARCLOUD_TOKEN}" -DskipNestedConfigMetadataGen=true -Dverbose=true \
-Dsonar.coverage.jacoco.xmlReportPaths=./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml