SonarQubeAnalyze 8 warning: "Final field id ... has been mutated reflectively"

Must-share information (formatted with Markdown):

  • which versions are you using: Enterprise Edition v2026.4.1 (126914)
  • how is SonarQube deployed: self-hosted SonarQube Enterprise Edition deployment running on Windows VMs with an Azure SQL backend
  • what are you trying to achieve
  • what have you tried so far to achieve this

Hello,
We recently started seeing the following warning during our Azure DevOps SonarQube analysis step:

INFO  JRE provisioning: os[windows], arch[amd64] 

WARNING: Final field id in class 

org.sonarsource.scanner.lib.internal.facade.forked.JavaRunnerFactory$JreMetadata 

has been mutated reflectively by class 

com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2 

WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning 

WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled 

We are on Azure DevOps Task Version: 8.2.4

SonarScanner CLI 8.1.0.6389

SonarQube Server 2026.4.1.126914

Is this a known issue with SonarScanner CLI 8.1.0.6389 when running on JDK 26?

Should this warning be ignored for now, or is there a recommended remediation?

Any guidance would be appreciated.

Hey @vinuprasath, welcome to the Community! I think the problem might come from using Java 26. I don’t think our Scanner is tested for that version. Could you try running the analysis with Java 21 and seeing if that gets rid of the warning?

By the way, is your project a Java 26 version? Or is it not a Java project at all?

It is not a Java project. The SonarQubeAnalyze@8 step has the jdkVersion that points to jdk26

Yep, jdkVersion is the input that lets you pass a Java executable for the Scanner to run on. It is controlled by you. Can you try passing JAVA_HOME_21_X64 (this env variable is usually pre-set correctly on Windows agents)? If it’s not set in your agent, then you could try JAVA_HOME_17_X64