-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[java] LocalVariableCouldBeFinal false-positive with lombok.val #5079
Copy link
Copy link
Closed
Labels
a:false-positivePMD flags a piece of code that is not problematicPMD flags a piece of code that is not problematic
Milestone
Description
Rule:LocalVariableCouldBeFinal
Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/pmd/pmd_rules_java_codestyle.html#methodargumentcouldbefinal
Description: lombok.val is equivalet to final class
Code Sample demonstrating the issue:
import lombok.val;
val test04 = logicTestService.test();
// This is equivalent to:
// final String test04 = logicTestService.test();Error:
LocalVariableCouldBeFinal: Local variable 'test04' could be declared final
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a:false-positivePMD flags a piece of code that is not problematicPMD flags a piece of code that is not problematic