mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 04:21:24 +07:00
effectively final check (IDEA-128196)
This commit is contained in:
@@ -39,7 +39,7 @@ public class XXX {
|
||||
void m3(int x, boolean cond) {
|
||||
int y;
|
||||
if (cond) y = 1;
|
||||
foo(() -> x+<error descr="Variable used in lambda expression should be effectively final">y</error>);
|
||||
foo(() -> x+<error descr="Variable 'y' might not have been initialized">y</error>);
|
||||
}
|
||||
|
||||
void m4(int x, boolean cond) {
|
||||
@@ -128,3 +128,17 @@ class IDEA114737 {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class IDEA128196 {
|
||||
void a() {
|
||||
int value;
|
||||
|
||||
try {
|
||||
value = 1;
|
||||
} catch (Exception e) {
|
||||
return;
|
||||
}
|
||||
|
||||
new Thread(() -> System.out.println(value));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user