jakarta-eejerseysonarqube

Sonar Showing duplicated on Pojo Classes


First time i am using "Sonar Integrations" and sonar showing duplication on the lines however there seems to be no duplicacy in variables names and its @JsonProperty. For reference please find the attached image.

Sonar error image


Solution

  • Sonar also points out duplicated code in different files. Therefore you must have somewhere a different POJO in a different file, which also has getters for id / order_id / user_id / item_id.

    But clicking on the orange bar next to your marked code, Sonar will show you with a tooltip that actually which other block is considered a duplicate of the marked one, and also in which file.