I am using self4j for putting logger
LOGGER.info("Exception occurred while saving data {}", be);
But above statement showing sonar issue Not enough arguments. Using sonar lint 5.3.1 in eclipse
If I update above Logger as below then its not showing any issue
LOGGER.info("Exception occurred while saving data", be);
Or if I extract logger string in any constant file then its also working fine
private static final String LOG_STR = "Exception occurred while saving data {}";
LOGGER.info(LOG_STR , be);
Why its behaving different in different scenario?