Sonar methods should not be empty in the constructor

I upgraded my Sonar to version 5.1.2 and the message Methods should not be empty appears in this code:

 public User() {} public User (String login) { this.login = login; } 

This seems to be a mistake. I'm right? Because this has not happened before.

+6
source share
2 answers

I found this jira, this is the sound of a sonar.

https://jira.sonarsource.com/browse/SONARJAVA-1138

+5
source

This really seems like an unexpected behavior. I think this was the answer to the ticket above what caused it. I am trying to talk with the developer to set the rule S1186. If you want to follow:

https://jira.sonarsource.com/browse/SONARJAVA-1138

0
source

All Articles