mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ControlFlowAnalyzer: pass the control from expression statements to multi-catch exceptions
Fixes IDEA-232103 "Field may be 'final'" false positive for fields initialized in try-catch block with multi-catch GitOrigin-RevId: b286eb0ac347350490d3aaa35768fc4e0404db28
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3f182bfa57
commit
3ab008193a
+17
@@ -85,4 +85,21 @@ class D {
|
||||
System.out.println(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
class AssignFinal {
|
||||
private final String value;
|
||||
|
||||
public AssignFinal() {
|
||||
try {
|
||||
value = create();
|
||||
} catch (ClassNotFoundException | IllegalAccessException e) {
|
||||
<error descr="Variable 'value' might already have been assigned to">value</error> = "";
|
||||
}
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static native <T> T create() throws ClassNotFoundException, IllegalAccessException;
|
||||
}
|
||||
Reference in New Issue
Block a user