A RetroSearch Logo

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

Search Query:

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

[java] UnusedPrivateMethod false positive with static method and cast expression · Issue #3209 · pmd/pmd · GitHub

Affects PMD Version: 6.33.0

Rule: UnusedPrivateMethod

Description:
The usage of the static method is not detected anymore (not sure, if these details are relevant).
The false positive was not reported with PMD 6.32.0.
Maybe this is a side-effect of fixing #3118

Code Sample demonstrating the issue:

Method declaration:

private static JVariableSymbol getVarIfUnaryAssignment(ASTUnaryExpression node) {

Method call:

&& var.equals(ReachingDefsVisitor.getVarIfUnaryAssignment((ASTUnaryExpression) rhs));

Expected outcome:

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