I’m getting a Sonar CSRF Security Hotspot complaint on a Spring Boot code with Spring Security enabled that needs to be reviewed every then and now, and I would like to suppress the hotspot from the code as in @SuppressWarnings(“squid:x”) sonar.cpd.exclusions sonar.coverage.exclusions but as…
Tag: suppress-warnings
How to suppress FindBugs warnings for fields or local variables?
I would like to suppress FindBugs warnings for specific fields or local variables. FindBugs documents that the Target can be Type, Field, Method, Parameter, Constructor, Package for its edu.umd.cs.findbugs.annotations.SuppressWarning annotation [1]. But it does not work for me to annotate the field, only when…
How to specifically suppress “Comparing identical expressions” in Eclipse-Helios JDT
I tried annotating the enclosing method with but this does not work (worse yet, the annotation results in its own Unsupported @SuppressWarnings(“compareIdentical”) warning!) I know that I can always use but that’d be more warning-suppression than I want. FWIW, I got the “compareIdentic…
Suppress deprecated import warning in Java
In Java, if you import a deprecated class: You get this warning: The type SomeDeprecatedClass is deprecated Is there a way to suppress this warning? Answer To avoid the warning: do not import the class instead use the fully qualified class name and use it in as few locations as possible.