JD.UN.PMETJD.UN.PMET occurs if no call for method is found in the analyzed context. This checker is triggered only by private methods. Vulnerability and riskUnused 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 preventionRemove unused private methods. Example 19 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. Security guidelinesRelated checkers |