A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/2255 below:

[java] InvalidLogMessageFormat false-positive for a lambda argument · Issue #2255 · pmd/pmd · GitHub

Affects PMD Version: 6.21.0

Rule: InvalidLogMessageFormat

Description:

This didn't happen on 6.20.0.

Code Sample demonstrating the issue:

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class InvalidLogMessageFormatTest {
	private static final Logger LOGGER = LoggerFactory.getLogger(InvalidLogMessageFormatTest.class);

	private InvalidLogMessageFormatTest() {
	}

	public static void main(String[] args) {
		foo(exception -> LOGGER.error("Foo", exception));
	}

	private static void foo(Consumer<Throwable> consumer) {
		consumer.accept(new IllegalArgumentException());
	}
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4