Please, prefix the report title with the language it applies to within brackets, such as [java] or [apex]. If not specific to a language, you can use [core]
Rule Set:
UnnecessaryLocalBeforeReturn
Description:
java.lang.ClassCastException: net.sourceforge.pmd.lang.java.ast.ASTSwitchStatement cannot be cast to net.sourceforge.pmd.lang.java.ast.ASTBlock
at net.sourceforge.pmd.lang.java.rule.design.UnnecessaryLocalBeforeReturnRule.hasAssertStatement(UnnecessaryLocalBeforeReturnRule.java:101)
at net.sourceforge.pmd.lang.java.rule.design.UnnecessaryLocalBeforeReturnRule.visit(UnnecessaryLocalBeforeReturnRule.java:52)
Code Sample demonstrating the issue:
public static int m() {
switch (0) {
default:
int i = 0;
return i;
}
}
Running PMD through: Gradle
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4