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

RFE: SLF4J_PARAMETER_TOSTRING

Open vorburger opened this issue 7 years ago • 2 comments

This is a suggestion for a new validation:

When reviewing code, I regularly see folks doing things such as:

LOG.trace("bla bla: {}", dpid.toString());

where that toString() is wrong of course, and can hurt performance.

It would be nice to automatically get any use of toString() in a parameter flagged up.

vorburger avatar Feb 09 '18 11:02 vorburger

Good idea.

maggu2810 avatar Feb 09 '18 12:02 maggu2810

@KengoTODA do you have any plans to add this, or would you welcome a PR with this?

vorburger avatar Nov 01 '18 12:11 vorburger