we have a project that PMD checks for violations, for example. unused private methods. Our problem is that we don’t know whether private methods that are annotated using can be ignored @PostConstruct.
A rule is defined as follows:
<rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod"/>
Edit:
My goal is to define it once to ignore annotated methods. I would like to prevent writing @SupressWarningsfor each method.
source
share