声纳方法在构造函数中不应为空 [英] Sonar Methods should not be empty at the constructor
本文介绍了声纳方法在构造函数中不应为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将我的声纳更新到版本 5.1.2,并且问题 Methods should not be empty
出现在此代码上:
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.
推荐答案
我找到了这个 jira,它是 Sonar 的错误.
I found this jira, It's a Sonar's Bug.
https://jira.sonarsource.com/browse/SONARJAVA-1138
这篇关于声纳方法在构造函数中不应为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文