S3457 False positive on SFL4J log statement with marker argument

sonarjava

(Hubert Klein Ikkink) #1

Tested on Sonarqube community edition 7.5 with SonarJava 5.10.1.

The following code raises an issue, but should not raise an issue, because the “message” has no placeholders. Statement without the marker argument raises no issue as expected.

org.slf4j.Logger slf4jLog;
org.slf4j.Marker marker;

slf4jLog.debug(marker, "message");

(Elena Vilchik) #2

Thanks for the feedback! I created a ticket https://jira.sonarsource.com/browse/SONARJAVA-3044