Every now and then we come across with some Sonarqube reported issues that seem (at least to us) as false positives.
For example when using a Spring JdbcTemplate to execute an update:
@Autowired private JdbcTemplate jdbc;
PS: Sonar interface is in Spanish
- Is this actually a false positive? I guess it is as the PreparedStamente is never else referenced, but used (and hopefully closed) internally by the JdbcTemplate.
- If it is, how should it be handled in SonarQube?
- Could the corresponding plugin (SonarJava I guess) be improved to detect these patterns?
- Any suggestions on improving our coding in this scenario to avoid SonarQube detecting it as an issue?