mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-116508 ("Local variable or parameter can be final" inspection use generates uncompilable code not extracting a really finalizable variable)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
class For {
|
||||
void f(List<String> list) {
|
||||
for (Iterator<String> it = list.iterator(); it.hasNext();) { // 'it' can be final but not reported
|
||||
for (Iterator<String> it = list.iterator(); it.hasNext();) {
|
||||
}
|
||||
for (int i = 0; i < 10; i++) {}
|
||||
for (int i = 0, length = 10; i < length; i++) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user