findbugs-slf4j icon indicating copy to clipboard operation
findbugs-slf4j copied to clipboard

SLF4J_FORMAT_SHOULD_BE_CONST mitigation

Open hanneskaeufler opened this issue 1 year ago • 0 comments

This is more a question that anything else, but what is a mitigation for e.g.

log.error(messageSource.getMessage("database.access.error", null, Locale.getDefault()), e);

so when the message really is coming from a method call or similar? Is there an alternative pattern other than to disable the warning in those instances? Thanks!

hanneskaeufler avatar Nov 27 '23 08:11 hanneskaeufler