Java 检查样式';这';关键词过度使用检测
是否有一个Checkstyle模块来检测这样的代码Java 检查样式';这';关键词过度使用检测,java,checkstyle,Java,Checkstyle,是否有一个Checkstyle模块来检测这样的代码 private ServiceClass service = ... public void someMethod(String param) { String result = this.service.find(param); if(!this.isValid(result)) { throw new RuntimeException(); } else { return resul
private ServiceClass service = ...
public void someMethod(String param) {
String result = this.service.find(param);
if(!this.isValid(result)) {
throw new RuntimeException();
} else {
return result;
}
}
private boolean isValid(String param) {
...
}
正如您在这里看到的实际上不需要这个,因为没有任何方法和字段重叠
该模块接近我的需要,但看起来它无法检测到这种过度使用
实际上不需要这样做,因为没有任何方法和字段重叠
没有任何Checkstyle检查标记不必要的使用此
<代码>要求此检查仅识别缺少此
的区域,而不是相反的区域