Jenkins Pipeline Failing Due to SonarQube Compatibility Issue with Java 8 – How to Dynamically Use Java 11 for Sonar Analysis?
I am encountering an issue when running a Jenkins pipeline that involves SonarQube (9.9) analysis. The job is failing on a Jenkins slave machine that runs Java 8. Below is the error message:
Non-primitive fields should not be “volatile”
I used this pattern to keep my code in Spring component thread safe:
Sonar: Non-primitive fields should not be “volatile”
I used this pattern to keep my code in Spring component thread safe: