Affects PMD Version: 6.35.0
Rule: LiteralsFirstInComparisons
Description: If two constants instead of literals are compared, it doesn't make sense to favor one over the other.
Code Sample demonstrating the issue:
pmd/pmd-core/src/main/java/net/sourceforge/pmd/PMDVersion.java
Lines 68 to 70 in 798d269
public static boolean isUnknown() { return UNKNOWN_VERSION.equals(VERSION); }Expected outcome:
PMD reports a violation at line 69, but that's wrong. That's a false positive.
Running PMD through: Maven
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