Skip to content

[java] UnusedPrivateMethod false positive from inner class via external class #1189

@arifogel

Description

@arifogel

Affects PMD Version: 6.4.0

Rule: UnusedPrivateMethod

Description:
A private method of an outer class called in an inner class via a method from an external class returning an object of the outer class type is falsely reported as being unused.

Code Sample demonstrating the issue:

Running PMD through: [Maven]

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:false-positivePMD flags a piece of code that is not problematic

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions