java - How can I disable checkstyle warnings for missing final modifiers on lambdas? -
i getting checkstyle warnings missing final modifiers when writing lambdas in java 8. want warnings when writing normal methods, not in lambdas.
for example, summing list of bigdecimals this:
values.stream().reduce(bigdecimal.zero, (a, b) -> a.add(b));
gives me following checkstyle warnings:
- variable 'a' should declared final. - variable 'b' should declared final.
is there way make checkstyle ignore when writing lambdas?
what version of checkstyle running. should have been fixed in version 6.5, if running earlier version it's known bug.
Comments
Post a Comment