A RetroSearch Logo

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

Search Query:

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

[java] PrematureDeclaration false positive for unused variables · Issue #3221 · pmd/pmd · GitHub

Affects PMD Version: 6.33.0

Rule: PrematureDeclaration

Description:

Don't report variables that are not used at all. Those should be left to UnusedLocalVariable.

Code Sample demonstrating the issue:

public String wrongEscapeSequences() 
    {
        final String r1 = "\u0008"; // unused var - not a premature declaration
        return "\u000csssdfsd";
    }

(from https://github.com/checkstyle/checkstyle/blob/checkstyle-8.10/src/it/resources/com/google/checkstyle/test/chapter2filebasic/rule232specialescape/InputIllegalTokenText.java#L17)

Expected outcome:


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