Skip to content

[java] LocalVariableCouldBeFinal on 'size' variable in for loop #1619

@RocketRider

Description

@RocketRider

Affects PMD Version: 7.0.0

Rule: LocalVariableCouldBeFinal

Description:
The following line causes a LocalVariableCouldBeFinal warning, but this can't be fixed. As "size" can't be declared final.

for (int i = 0, size = loaders.size(); i < size; ++i) {

Metadata

Metadata

Assignees

Labels

a:false-positivePMD flags a piece of code that is not problematic

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions