FP on squid:S3457 when using marker

When using slf4j logging statements with a marker a FP occures when the logging message has no arguments.


  • SonarQube: 7.2
  • Sonar Java 5.8

Example code to reproduce behaviour:

package foo.bar;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;

public class Main {

    public static final Logger LOGGER = LoggerFactory.getLogger(Main.class);
    static void logMarker() {
        Marker marker = MarkerFactory.getMarker("FooBar");
        LOGGER.debug(marker, "A message with Marker");  // FP on squid:S3457 here
1 Like

Don’t know why this got no attention, but a later post which reported the same issue was addressed by creating this issue in the Sonar issue tracker.

Hello Franz,

Indeed, your post must have fall through the cracks of our attention, sorry for that!

In any case, I am glad to hear that this issue has been fixed one way or another.