You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
publicfinalclassTest {
publicfinalThreadBAR = newThread(); // report two duplicate warnings in this linepublicThreadgetBAR() { // report one warning in this linereturnthis.BAR;
}
}
Expected outcome:
PMD reports two duplicate warnings at line 2, but one warning is appropriate.
Running PMD through:CLI
The text was updated successfully, but these errors were encountered:
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:
Expected outcome:
PMD reports two duplicate warnings at line 2, but one warning is appropriate.
Running PMD through: CLI
The text was updated successfully, but these errors were encountered: