简体   繁体   中英

Sonar Methods should not be empty at the constructor

I updated my Sonar to Version 5.1.2, and the issue Methods should not be empty appears on this code:

public User() {}

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

It seems to be a bug. Am I right? Because this didn't happen before.

I found this jira, It's a Sonar's Bug.

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

It really seems to be unexpected behavior. I think it was the ticket response above what caused it. I'm trying to talk to the developer to set the S1186 rule. If you want to follow:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM