ci.jenkins.io / PMD
failed
Dec 22, 2023 in 0s
1 new issue
Total | New | Outstanding | Fixed | Trend |
---|---|---|---|---|
1 | 1 | 0 | 0 | 👎 |
Reference build: Plugins » analysis-model » main #54
Details
Severity distribution of new issues
Error | Warning High | Warning Normal | Warning Low |
---|---|---|---|
0 | 0 | 1 | 0 |
Annotations
Check warning on line 601 in src/main/java/edu/hm/hafner/analysis/IssueBuilder.java
ci-jenkins-io / PMD
SimplifyBooleanReturns
NORMAL:
Avoid unnecessary if..then..else statements when returning booleans.
Raw output
Avoid unnecessary if-then-else statements when returning a boolean. The result of the conditional test can be returned instead. <pre> <code> public boolean isBarEqualTo(int x) { if (bar == x) { // this bit of code... return true; } else { return false; } } public boolean isBarEqualTo(int x) { return bar == x; // can be replaced with this } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_design.html#simplifybooleanreturns"> See PMD documentation. </a>
Loading