I get warnings about missing missing final modifiers when writing lambdas in Java 8. I want to get warnings when writing regular methods, but not in lambdas.
For example, adding up a list of BigDecimals, for example:
values.stream().reduce(BigDecimal.ZERO, (a, b) -> a.add(b));
provides the following warnings:
- Variable 'a' should be declared final. - Variable 'b' should be declared final.
Is there a way to make Checkstyle ignore this only when writing lambdas?
source share