Skip to content
Advertisement

Tag: suppress-warnings

How to SupressWarnings for Sonar Security Hotspots?

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 it it not a rule it has no id, at least on the screen How can

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 I annotate the method the warning gets suppressed. Annotating a whole method seems to broad to

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 “compareIdentical” string from the “Warning Options” table in http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm (a hail-mary pass, to be sure). Thanks! Answer Officially,

Advertisement