Version:
- Enterprise Edition
- Version 8.9 (build 43852)
Problem statement:
When I go to issues and view where in the code the issue is occurring the code has not been updated. As an example I’m using the master branch only for this project and I have changed the following code as follows
What’s in Git
public class R7Asset {
@JsonProperty("id")
private Integer id;
@JsonProperty("ids")
private List<R7Id> ids = new ArrayList<>();
@JsonProperty("assessedForPolicies")
private Boolean assessedForPolicies;
@JsonProperty("assessedForVulnerabilities")
private Boolean assessedForVulnerabilities;
@JsonProperty("configurations")
private List<R7Configuration> configurations = new ArrayList<>();
what’s in Sonar
public class R7Asset {
@JsonProperty("addresses")
private List<R7Address> addresses = new ArrayList<R7Address>()
@JsonProperty("assessedForPolicies")
private Boolean assessedForPolicies;
@JsonProperty("assessedForVulnerabilities")
private Boolean assessedForVulnerabilities;
@JsonProperty("configurations")
private List<R7Configuration> configurations = new ArrayList<R7Configuration>();
I’ve seen this occur now in two old projects. I tried to create a new project and reproduce and everything was fine in the new project. I also tried it on a project that’s 18 months old and still unable to reproduce.
There is no workaround that I’ve found. I deliberately changed the code formatting to see if it would trigger something and it didn’t. I also resolved the issue in Sonar to see if it would trigger something and it didn’t.
The upshot of this is we cannot trust the numbers we’re getting from Sonar and we have thousands of projects using it for quality gates during the build.