A RetroSearch Logo

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

Search Query:

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

[java] ImmutableField false-positive with lambdas · Issue #855 · pmd/pmd · GitHub

PMD version 6.0.0. Something like:

class Bar {
}

class Foo {
	private Bar bar;

	public Foo() {
		someMethod(() -> {
			bar = new Bar();
		});
	}

	private void someMethod(Runnable action) {
		action.run();
	}
}

Gives an ImmutableField warning for bar which actually is not correct - putting final on bar prevents that code from compiling.


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