mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java: report "Static initializer references subclass" when subclass is private but indirect (IDEA-348744)
GitOrigin-RevId: ffc256b9afdcb4cd1ea073263e55188ad02b5636
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d02beebabe
commit
1250b4612c
+3
@@ -21,6 +21,7 @@ class Super {
|
||||
static Super OK_SAME_ANONYMOUS = new Super(){};
|
||||
static Sub[] OK_ARRAY = new Sub[3];
|
||||
static Super OK_PRIVATE = new MySub();
|
||||
static Super C6 = new <warning descr="Referencing subclass SubSub from superclass Super initializer might lead to class loading deadlock">SubSub</warning>();
|
||||
static java.util.List<Sub> OK_GENERICS = new java.util.ArrayList<Sub>();
|
||||
|
||||
static {
|
||||
@@ -38,6 +39,8 @@ class Super {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static class SubSub extends Sub {} // private but indirect subclass
|
||||
}
|
||||
|
||||
class Sub extends Super implements Intf {
|
||||
|
||||
Reference in New Issue
Block a user