3 回复
Demo代码:
public abstract class TestContext {
private static Map<Integer,TestContext> contextMap = new HashMap<>();
static {
contextMap.put(1,new TestOneContext());
}
}
class TestOneContext extends TestContext {
}
静态代码块中,警告提示Referencing subclass TestOneContext from superclass TestContext initializer might lead to class loading deadlock
添加回复
请先登陆