A RetroSearch Logo

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

Search Query:

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

[java] DoNotUseThreads report duplicate warnings · Issue #4210 · pmd/pmd · GitHub

Affects PMD Version:6.51.0

Rule: DoNotUseThreads

Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_multithreading.html#donotusethreads

Description:
In the following code example, line 2 uses the class Thread which should be forbiden and it reports two duplicate warnings.

Code Sample demonstrating the issue:

public final class Test {  
    public final Thread BAR = new Thread();  // report two duplicate warnings in this line
   
    public Thread getBAR() {  // report one warning in this line
        return this.BAR;
    }
}

Expected outcome:

PMD reports two duplicate warnings at line 2, but one warning is appropriate.

Running PMD 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