JD.UN.PMET occurs if no call for method is found in the analyzed context. This checker is triggered only by private methods.

Vulnerability and risk

Unused methods can be used as back doors. They also increase code footprint in memory. Additionally, they increase the size of source code which decreases maintainability.

Mitigation and prevention

Remove unused private methods.

Example 1

9      static class MyClass {
10         private void foo(){
11             System.err.println("Hello, World!");
12         }
13     }

JD.UN.PMET is reported for method declaration on line 10: Private method 'foo' is unused.

Related checkers