IntelliJ reports classes that refer to their subclasses in static initializers or static fields
basil opened this issue · comments
Basil Crow commented
According to IntelliJ
such references can cause JVM-level deadlocks in multithreaded environment, when one thread tries to load the superclass and another thread tries to load the subclass at the same time
- Referencing subclass
StaticFunction
from superclassFunction
initializer might lead to class loading deadlock - Referencing subclass
ByDepth
from superclassTreePruner
initializer might lead to class loading deadlock
Satyam Kumar Navneet commented
Hey, @basil Can you please tell me what I have to do in this?
Basil Crow commented
I do not know offhand what needs to be done to solve this bug. It would require independent analysis.