A RetroSearch Logo

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

Search Query:

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

[java] UnusedLocalVariable false positive · Issue #257 · pmd/pmd · GitHub

Rule Set:
UnusedLocalVariable

Description:
When one of the variables is enclosed in (unnecessary) parentheses, it triggers a false positive. In the example below, the variable a gets flagged as an UnusedLocalVariable (but the variable b does not).

Code Sample demonstrating the issue:

public class Test {
    public static void main(String[] args) {
        double a = 4.0; 
        double b = 2.0; 
        double result = Math.sqrt((a) - b);
        System.out.println(result);
    }
}

**Running PMD 5.5.2 through: CLI


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