Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/355.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 检查样式';这';关键词过度使用检测_Java_Checkstyle - Fatal编程技术网

Java 检查样式';这';关键词过度使用检测

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

是否有一个Checkstyle模块来检测这样的代码

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检查标记不必要的使用
<代码>要求此检查仅识别缺少此
的区域,而不是相反的区域