#695 FinalLocalVariable does not check for loop variable

SVN_Head
closed
nobody
None
1
2013-10-16
2013-02-12
Nathan
No

Using version 5.6 of checkstyle (sorry couldn't find any info on how this relates to Milestone).

With FinalLocalVariable enabled, checkstyle does not complain about following code:

for (String s : new String[] {"A", "B", "C"}) {
System.out.println(s);
}

Should require:

for (final String s : new String[] {"A", "B", "C"}) {
System.out.println(s);
}

Discussion

  • Roman Ivanov
    Roman Ivanov
    2013-10-16

    • status: open --> closed