SonarLint: Invoke method(s) only conditionally
If you are using IntelliJ and are using the SonarLint linting plugin, then you may have come across the error: SonarLint: Invoke method(s) only conditionally Problem This error is often caused when using a logger coupled with the String.format method like this: The reason for this is that the logger itself will be formatting the string. So using String.format inside...