A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/575 below:

[java] LiteralsFirstInComparisons should consider constant fields · Issue #575 · pmd/pmd · GitHub

Rule: PositionLiteralsFirstInComparisons (deprecated), PositionLiteralsFirstInCaseInsensitiveComparisons (deprecated) and LiteralsFirstInComparisons

Description: (Position)LiteralsFirstInComparisons do not appear to be properly checking this rule completely, perhaps due to use of constants or some other factor

Code Sample demonstrating the issue:

private static final String ABOVE_CORE = "Above-Core";
if (abc.getOm() == 1 && abc.getCore().equals(ABOVE_CORE)) {

Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]


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